Skip to content
Permalink
Browse files

Menubar: Put focus back to button when closing menu

  • Loading branch information
jzaefferer committed Mar 17, 2011
1 parent b53f242 commit d4a81ec0432595c90a1808220ebd66ef6b6c8511
Showing with 4 additions and 2 deletions.
  1. +4 −2 tests/visual/menu/menubar.js
@@ -92,8 +92,10 @@ $.widget("ui.menubar", {
self._bind({
keyup: function(event) {
if (event.keyCode == $.ui.keyCode.ESCAPE) {
if (self.active.menu("left") !== true) {
self._close();
if (self.active.menu("left", event) !== true) {
self._close( event );
// bypass the focus event handler above
self.active.prev()[0].focus();
}
}
}

0 comments on commit d4a81ec

Please sign in to comment.
You can’t perform that action at this time.