]> source.dussan.org Git - jquery-ui.git/commitdiff
Menubar: Close submenus on Escape first, only close all when on top-level
authorjzaefferer <joern.zaefferer@gmail.com>
Thu, 17 Mar 2011 12:58:57 +0000 (13:58 +0100)
committerjzaefferer <joern.zaefferer@gmail.com>
Thu, 17 Mar 2011 12:58:57 +0000 (13:58 +0100)
tests/visual/menu/menubar.js

index bfd691bf02310006fe18001909fba33e3944d0fb..1da54d532c02aef23b7659f579aa54c17c37ad41 100644 (file)
@@ -92,7 +92,9 @@ $.widget("ui.menubar", {
                self._bind({
                        keyup: function(event) {
                                if (event.keyCode == $.ui.keyCode.ESCAPE) {
-                                       self._close();
+                                       if (self.active.menu("left") !== true) {
+                                               self._close();
+                                       }
                                }
                        }
                });