changeset 1765:6a0d5584a605 2.2.55-b07

RT-31393: Wrong widget is selected if another had focus before it Reviewed-by: jgiles,dmarkov
author anashaty
date Wed, 22 Jan 2014 17:11:06 +0400
parents d24b55c7fb6a
children 10be003ded6b
files javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/ComboBoxBaseBehavior.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/ComboBoxBaseBehavior.java	Wed Jan 22 17:08:12 2014 +0400
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/ComboBoxBaseBehavior.java	Wed Jan 22 17:11:06 2014 +0400
@@ -164,6 +164,7 @@
     @Override public void mouseReleased(MouseEvent e) {
         super.mousePressed(e);
         
+	boolean wasArmed = getControl().isArmed();
         disarm();
         
         // The wasComboBoxButtonClickedForAutoHide boolean was added to resolve
@@ -173,7 +174,9 @@
         // appears below in the autoHide() method.
         if (getControl().isShowing()) {
             hide();
-        } else if (! wasComboBoxButtonClickedForAutoHide && getControl().contains(e.getX(), e.getY())) {
+        } else if (! wasComboBoxButtonClickedForAutoHide 
+		&& getControl().contains(e.getX(), e.getY())
+		&& wasArmed) {
             show();
         } else {
             wasComboBoxButtonClickedForAutoHide = false;