aboutsummaryrefslogtreecommitdiffstats
path: root/tests/visual/menu
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2011-03-17 13:58:57 +0100
committerjzaefferer <joern.zaefferer@gmail.com>2011-03-17 13:58:57 +0100
commitb53f242d2cbb0faf680f905914c2197d95c03735 (patch)
treea29f36b3a6d3c7489840cdc2a998f66396fae62c /tests/visual/menu
parent37fee24ea60925b9d81251b5c734cb6c40465949 (diff)
downloadjquery-ui-b53f242d2cbb0faf680f905914c2197d95c03735.tar.gz
jquery-ui-b53f242d2cbb0faf680f905914c2197d95c03735.zip
Menubar: Close submenus on Escape first, only close all when on top-level
Diffstat (limited to 'tests/visual/menu')
-rw-r--r--tests/visual/menu/menubar.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/visual/menu/menubar.js b/tests/visual/menu/menubar.js
index bfd691bf0..1da54d532 100644
--- a/tests/visual/menu/menubar.js
+++ b/tests/visual/menu/menubar.js
@@ -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();
+ }
}
}
});