aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.menu.js
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2011-03-17 17:43:11 +0100
committerjzaefferer <joern.zaefferer@gmail.com>2011-03-17 17:43:11 +0100
commit5a112d4e03b4c1073e2136b83ed8316c13eaa536 (patch)
tree61c85a30d8a029f014b4732af74995e1a14fa67b /ui/jquery.ui.menu.js
parentc0f7afd16037940df969af9f1f3d5ffe73bcff5b (diff)
downloadjquery-ui-5a112d4e03b4c1073e2136b83ed8316c13eaa536.tar.gz
jquery-ui-5a112d4e03b4c1073e2136b83ed8316c13eaa536.zip
Menu: Close submenu on ESCAPE keypress
Diffstat (limited to 'ui/jquery.ui.menu.js')
-rw-r--r--ui/jquery.ui.menu.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js
index ad2fa3092..af1101f73 100644
--- a/ui/jquery.ui.menu.js
+++ b/ui/jquery.ui.menu.js
@@ -112,6 +112,12 @@ $.widget("ui.menu", {
event.preventDefault();
event.stopImmediatePropagation();
break;
+ case $.ui.keyCode.ESCAPE:
+ if ( self.left( event ) ) {
+ event.stopImmediatePropagation();
+ }
+ event.preventDefault();
+ break;
default:
event.stopPropagation();
clearTimeout(self.filterTimer);