-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b18
-
x86
-
os_x
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2224609 | 8 | Anton Tarasov | P3 | Resolved | Fixed | b40 |
Run the attached minimal example as an application and as an applet. It will rather slowly transfer focus to and fro using focusNext/PreviousComponent of KFM and transferFocus() of the Component. You will see that final focused component will be different for applet and application.
I have some tests failing on Mac for exactly that reason: button.transferFocus() called from a last child component in a Frame (not that button), when running as an applet, would transfer not to a next component after button but to the button itself.
Perhaps this behaviour is someway expected but it isn't clear from a specification. And then, the tests don't expect it, and they usually pass on the other platforms.
Yet another detail: an example works not on EDT as in the real test, however the real test fails on EDT just the same.
I have some tests failing on Mac for exactly that reason: button.transferFocus() called from a last child component in a Frame (not that button), when running as an applet, would transfer not to a next component after button but to the button itself.
Perhaps this behaviour is someway expected but it isn't clear from a specification. And then, the tests don't expect it, and they usually pass on the other platforms.
Yet another detail: an example works not on EDT as in the real test, however the real test fails on EDT just the same.
- backported by
-
JDK-2224609 [macosx] Test failure because Component.transferFocus() works differently in applet and application.
- Resolved
- relates to
-
JDK-7160904 [TEST_BUG] closed/java/awt/Focus/FocusPolicyTest/FocusPolicyTest.java failed on solaris,linux since 7u4b18
- Open
-
JDK-8032579 Incorrect FocusTraversalPolicy with mixed AWT/Swing toplevels
- Closed