Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Menu: Remove close delay for keyboard interaction to fix an issue wit…

…h properly adding and removing ui-state-active class during quick navigation through submenus
  • Loading branch information...
commit 97cb7deceeeeac93e583044886d8ed1966d8baf5 1 parent eaec319
Kris Borchers kborchers authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 ui/jquery.ui.menu.js
10 ui/jquery.ui.menu.js
View
@@ -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 ) ) ) {
Please sign in to comment.
Something went wrong with that request. Please try again.