changeset 2156:f964af4aec0b

RT-26393 : ComboBox - left/right arrow key traversal is broken when editing a string
author mickf
date Mon, 07 Jan 2013 18:53:54 +0000
parents 5904556f2895
children 141fb741cb95
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Mon Jan 07 00:21:48 2013 +0000
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Mon Jan 07 18:53:54 2013 +0000
@@ -38,6 +38,7 @@
 import javafx.beans.value.ObservableValue;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
+import javafx.event.Event;
 import javafx.event.EventHandler;
 import javafx.event.EventTarget;
 import javafx.scene.Node;
@@ -166,7 +167,13 @@
                     }
                 }
                 
-                textField.fireEvent(t);
+                /*
+                ** We didn't want this event, re-target it
+                ** for textField, and consume our copy
+                */
+                Event retargetedEvent = t.copyFor(t.getSource(), textField);
+                textField.fireEvent(retargetedEvent);
+                t.consume();
             }
         });