Skip to content

Commit 5eb1aee

Browse files
committed
Menu: Remove unnecessary click delay and change focus delay for AT to the default delay
1 parent be0be89 commit 5eb1aee

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

ui/jquery.ui.menu.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,10 @@ $.widget( "ui.menu", {
7777
mouseHandled = true;
7878

7979
this.select( event );
80-
// Redirect focus to the menu with a delay for firefox
81-
this._delay(function() {
82-
if ( !this.element.is(":focus") ) {
83-
this.element.focus();
84-
}
85-
}, 20 );
80+
// Redirect focus to the menu
81+
if ( !this.element.is(":focus") ) {
82+
this.element.focus();
83+
}
8684
}
8785
},
8886
"mouseenter .ui-menu-item": function( event ) {
@@ -488,7 +486,7 @@ $.widget( "ui.menu", {
488486
// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
489487
this._delay(function() {
490488
this.focus( event, newItem );
491-
}, 20 );
489+
});
492490
}
493491
},
494492

0 commit comments

Comments
 (0)