changeset 1052:ba15de29d459

RT-21088: ComboBox: regression with focusedProperty
author jgiles
date Wed, 16 May 2012 11:20:05 +1200
parents ce2983e07daf
children 0e266969dcbf
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Wed May 16 11:06:12 2012 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Wed May 16 11:20:05 2012 +1200
@@ -237,9 +237,10 @@
         // to the TextField. This ensures that the ComboBox appears focused
         // externally for people listening to the focus property.
         textField.focusedProperty().addListener(new ChangeListener<Boolean>() {
-            @Override public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1) {
-	        // RT-20657 focus ring gets stuck in a editable combobox
-                // comboBox.requestFocus();
+            @Override public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean hasFocus) {
+                if (hasFocus) {
+                    comboBox.requestFocus();
+                }
             }
         });