United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7150345 [macosx] Can't type into applets at allstarpuzzles.com
JDK-7150345 : [macosx] Can't type into applets at allstarpuzzles.com

Details
Type:
Bug
Submit Date:
2012-03-01
Status:
Closed
Updated Date:
2012-07-04
Project Name:
JDK
Resolved Date:
2012-07-04
Component:
client-libs
OS:
os_x
Sub-Component:
java.awt
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
7u4
Fixed Versions:
7u6 (b03)

Related Reports
Backport:
Relates:

Sub Tasks

Description
You can't type into the applets at allstarpuzzles.com. They load, but anything requiring key input fails.

1. Install the Java plugin on Mac OS X.
2. Go to http://www.allstarpuzzles.com/cryptogram/02639.html
3. Click on a blank space
4. Press a letter key
---> No character draws. You should see the letter you typed.

Works with Apple's JDK 6.

                                    

Comments
EVALUATION

The issue is a regression of the fix for 7129825:

http://hg.openjdk.java.net/jdk7u/jdk7u-osx/jdk/rev/bdf67b76a4f0

The fix for 7129825 started to reject cross-application activation requests in the plugin environment. Here's the code that rejects the focus requests:

src/macosx/classes/sun/lwawt/LWWindowPeer.java

public boolean requestWindowFocus(CausedFocusEvent.Cause cause) {
    ...

    // Cross-app activation requests are not allowed.
    if (cause != CausedFocusEvent.Cause.MOUSE_EVENT &&
        !((LWToolkit)Toolkit.getDefaultToolkit()).isApplicationActive())
    {
        focusLog.fine("the app is inactive, so the request is rejected");
        return false;
    }

    ...
}
                                     
2012-03-05
EVALUATION

There is a fix for this issue - the fix partically reverts the changes for 7129825 (which isn't valid for the embedded case) and introduces new focus handlers in CEmbeddedFrame class to track the "active" state of the top-level and the fix rejects focus requests if the top-level isn't active.
                                     
2012-03-06
SUGGESTED FIX

Here's a preliminary changes:

http://spbweb.russia.sun.com/~dcherepa/macport/7150345/webrev-deploy/index.html
http://spbweb.russia.sun.com/~dcherepa/macport/7150345/webrev-jdk/index.html
                                     
2012-03-06
SUGGESTED FIX

JDK's changeset - http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/e7d5379c96c6
                                     
2012-03-16



Hardware and Software, Engineered to Work Together