Skip to content

Commit

Permalink
Menu: Close submenu on ESCAPE keypress
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaefferer committed Mar 17, 2011
1 parent c0f7afd commit 5a112d4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ui/jquery.ui.menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5a112d4

Please sign in to comment.