changeset 175:e6f76c00bde3 2.1-b06

RT-17222 : Focus owner not updated after mouse click
author mickf
date Tue, 20 Dec 2011 11:29:08 +0000
parents b4b12adce4a1
children 30b646dfb3df 817e2d493a1d e6286f30f78a
files javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/ScrollPaneBehavior.java
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/ScrollPaneBehavior.java	Mon Dec 19 22:42:16 2011 -0500
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/ScrollPaneBehavior.java	Tue Dec 20 11:29:08 2011 +0000
@@ -43,6 +43,7 @@
 import javafx.scene.control.ScrollPane;
 import javafx.scene.input.KeyCode;
 import javafx.scene.input.KeyEvent;
+import javafx.scene.input.MouseEvent;
 
 import com.sun.javafx.scene.control.skin.ScrollPaneSkin;
 
@@ -162,6 +163,11 @@
         getControl().requestFocus();
     }
 
+    @Override public void mousePressed(MouseEvent e) {
+        super.mousePressed(e);
+        getControl().requestFocus();
+    }
+
     /**
      * Class to handle key bindings based upon the orientation of the control.
      */