changeset 296:55346b3feef9

fix RT-18859 : Return key in a TextField makes the first menu item within the menubar open.
author Paru Somashekar <paru.somashekar@oracle.com>
date Fri, 20 Jan 2012 16:07:10 -0800
parents c06a484e652e
children ed8104fd3efa
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/MenuBarSkin.java
diffstat 1 files changed, 12 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/MenuBarSkin.java	Fri Jan 20 15:32:00 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/MenuBarSkin.java	Fri Jan 20 16:07:10 2012 -0800
@@ -185,17 +185,18 @@
                     case DOWN:
                     case SPACE:
                     case ENTER:
-                        if (control.getScene().getWindow().isFocused()) {
-                            if (focusedMenuIndex != -1) {
-                                if (!isMenuEmpty(getSkinnable().getMenus().get(focusedMenuIndex))) {
-                                    openMenu = getSkinnable().getMenus().get(focusedMenuIndex);
-                                    openMenu.show();
-                                } else {
-                                    openMenu = null;
-                                }
-                                event.consume();
-                            }
-                        }
+                        // RT-18859: Doing nothing for down, space and enter 
+//                        if (control.getScene().getWindow().isFocused()) {
+//                            if (focusedMenuIndex != -1) {
+//                                if (!isMenuEmpty(getSkinnable().getMenus().get(focusedMenuIndex))) {
+//                                    openMenu = getSkinnable().getMenus().get(focusedMenuIndex);
+//                                    openMenu.show();
+//                                } else {
+//                                    openMenu = null;
+//                                }
+//                                event.consume();
+//                            }
+//                        }
                         break;
                 }