<Swing Dev> [15] RFR JDK-8153090: TAB key cannot change input focus after the radio button in the Color Selection dialog
Pankaj Bansal
pankaj.b.bansal at oracle.com
Mon Feb 17 06:48:38 UTC 2020
Hi All,
Please review the following fix for jdk15.
Bug:
https://bugs.openjdk.java.net/browse/JDK-8153090
webrev:
http://cr.openjdk.java.net/~pbansal/8153090/webrev00/
Issue:
In case of JColorChooser, if one of the color dialogs is activated and the focus is on JRadioButton and "TAB" key is pressed to move the focus to next component, the focus is not moving to next component. The JRadioButton remains in the focus. Due to this, the accessibility is not working properly.
Cause:
The JColorChooser is using the ContainerFocusTraversalPolicy to manage the focus traversal. This policy is causing issues in the JColorChooser. The problem is due to the way it creates the list of all the components in the container while deciding upon which component should be selected as focus owner on pressing the TAB key.
Fix:
The fix is to remove the use of ContainerFocusTraversalPolicy. When this policy is not explicitly set on JColorChooser, it will use the SortingFocusTraversalPolicy, which does not have these issues and works fine for JColorChooser.
The fix can be verified by running SwingSet2 demo and using the JColorChooser demo. I have tested this on Windows, Mac and Linux.
Regards,
Pankaj Bansal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/swing-dev/attachments/20200216/add76224/attachment.htm>
More information about the swing-dev
mailing list