Reviewers: jlabanca, Description: When a menu is opened, but not entered, pressing escape fails to close the menu because the popup does not yet have focus. Check for this case and manually close the popup.
Please review this at http://gwt-code-reviews.appspot.com/33842 Affected files: user/src/com/google/gwt/user/client/ui/MenuBar.java Index: user/src/com/google/gwt/user/client/ui/MenuBar.java =================================================================== --- user/src/com/google/gwt/user/client/ui/MenuBar.java (revision 5508) +++ user/src/com/google/gwt/user/client/ui/MenuBar.java (working copy) @@ -536,6 +536,11 @@ break; case KeyCodes.KEY_ESCAPE: closeAllParents(); + // Ensure the popup is closed even if it has not been enetered + // with the mouse or key navigation + if (parentMenu == null && popup != null) { + popup.hide(); + } eatEvent(event); break; case KeyCodes.KEY_ENTER: --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
