changeset 1428:b26dbc994eec

RT-23288: [Accordion] SHIFT-TAB should move focus to previous control.
author Kinsley Wong
date Tue, 10 Jul 2012 13:53:18 -0700
parents 9b69d1047d82
children 153fdd6ebb3d
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TitledPaneSkin.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TitledPaneSkin.java	Tue Jul 10 13:52:24 2012 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TitledPaneSkin.java	Tue Jul 10 13:53:18 2012 -0700
@@ -551,7 +551,11 @@
             int index = engine.registeredNodes.indexOf(node);
 
             if (index == -1 && direction.equals(Direction.PREVIOUS)) {
-                getSkinnable().requestFocus();
+                // If the parent is an accordion we want to focus to go outside of the
+                // accordion and to the previous focusable control.
+                if (getSkinnable().getParent() != null && getSkinnable().getParent() instanceof AccordionSkin) {
+                    new TraversalEngine(getSkinnable(), false).trav(getSkinnable().getParent(), Direction.PREVIOUS);
+                }
             }
             if (index == -1 && direction.equals(Direction.NEXT)) {
                 // If the parent is an accordion we want to focus to go outside of the