-
Enhancement
-
Resolution: Fixed
-
P4
-
8, 11, 17, 18, 19, 20
-
b19
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8288725 | 17.0.5-oracle | Dukebot | P4 | Resolved | Fixed | b01 |
JDK-8288952 | 17.0.5 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
JDK-8295142 | 11.0.18 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
JDK-8288940 | 11.0.17-oracle | Dukebot | P4 | Resolved | Fixed | b01 |
JDK-8289038 | 8u351 | Dukebot | P4 | Resolved | Fixed | b01 |
Issue:
As part of the Merlin focus project, JComponent.setRequestFocusEnabled was
deprecated and its implementation was changed to map exactly to the new
method Component.setFocusable. Scott believes that the old behavior may be
preferable. He would like to be able to specify that a Component is focusable,
and should receive focus during keyboard traversal, but that it should not
automatically take focus when the user clicks on it with the mouse.
We are concerned that the accessibility team would be against this behavior,
and this also seems like more of a PLAF issue. Nevertheless, we should look
into it before beta ships.
Fix:
After some discussion we decided that the best balance of the old and new would be to make this an advisory property. This property will not be synonymous with focusable. Instead our mouse listeners will check this property before requesting focus. This provides as closely as possible the old behavior, while allowing people to use the new focusable property if they don't want a component focusable at all.
Testing:
Tested in mach5, 10 times with all the 3 available platform like macosx, windows and linux and got all Pass.
- backported by
-
JDK-8288725 Write an automated regression test for RFE 4371575
- Resolved
-
JDK-8288940 Write an automated regression test for RFE 4371575
- Resolved
-
JDK-8288952 Write an automated regression test for RFE 4371575
- Resolved
-
JDK-8289038 Write an automated regression test for RFE 4371575
- Resolved
-
JDK-8295142 Write an automated regression test for RFE 4371575
- Resolved
- relates to
-
JDK-4371575 The future of JComponent.setRequestFocusEnabled should be reevaluated
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/380cbc80
-
Commit openjdk/jdk17u-dev/d798aa2a
-
Commit openjdk/jdk/447c2d13
-
Review openjdk/jdk11u-dev/1427
-
Review openjdk/jdk17u-dev/474
-
Review openjdk/jdk/8143