mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Menubar: Put focus back to button when closing menu
This commit is contained in:
parent
b53f242d2c
commit
d4a81ec043
@ -92,8 +92,10 @@ $.widget("ui.menubar", {
|
|||||||
self._bind({
|
self._bind({
|
||||||
keyup: function(event) {
|
keyup: function(event) {
|
||||||
if (event.keyCode == $.ui.keyCode.ESCAPE) {
|
if (event.keyCode == $.ui.keyCode.ESCAPE) {
|
||||||
if (self.active.menu("left") !== true) {
|
if (self.active.menu("left", event) !== true) {
|
||||||
self._close();
|
self._close( event );
|
||||||
|
// bypass the focus event handler above
|
||||||
|
self.active.prev()[0].focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user