mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04:00
Menu: Remove close delay for keyboard interaction to fix an issue with properly adding and removing ui-state-active class during quick navigation through submenus
This commit is contained in:
10
ui/jquery.ui.menu.js
vendored
10
ui/jquery.ui.menu.js
vendored
@@ -330,9 +330,13 @@ $.widget( "ui.menu", {
|
||||
// highlight active parent menu item, if any
|
||||
this.active.parent().closest( ".ui-menu-item" ).children( "a:first" ).addClass( "ui-state-active" );
|
||||
|
||||
this.timer = this._delay(function() {
|
||||
this._close();
|
||||
}, this.delay );
|
||||
if ( event.type === "keydown" ) {
|
||||
this._close();
|
||||
} else {
|
||||
this.timer = this._delay(function() {
|
||||
this._close();
|
||||
}, this.delay );
|
||||
}
|
||||
|
||||
nested = $( "> .ui-menu", item );
|
||||
if ( nested.length && ( /^mouse/.test( event.type ) ) ) {
|
||||
|
||||
Reference in New Issue
Block a user