changeset 7693:0702536fb5c7

[Accessibility] Fix bad handling of SHOW_MENU in ContextMenuContent
author Felipe Heidrich <felipe.heidrich@oracle.com>
date Fri, 15 Aug 2014 10:30:31 -0700
parents 5e4e957c51a6
children 971100792fac
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuContent.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuContent.java	Fri Aug 15 14:36:29 2014 -0400
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuContent.java	Fri Aug 15 10:30:31 2014 -0700
@@ -1536,7 +1536,11 @@
                 case SHOW_MENU:{
                     if (item instanceof Menu) {
                         final Menu menuItem = (Menu) item;
-                        menuItem.hide();
+                        if (menuItem.isShowing()) {
+                            menuItem.hide();
+                        } else {
+                            menuItem.show();
+                        }
                     }
                     break;
                 }