Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 authored May 08, 2012

Showing 1 changed file with 7 additions and 3 deletions. Show diff stats Hide diff stats

  1. 10  ui/jquery.ui.menu.js
10  ui/jquery.ui.menu.js
@@ -330,9 +330,13 @@ $.widget( "ui.menu", {
330 330
 		// highlight active parent menu item, if any
331 331
 		this.active.parent().closest( ".ui-menu-item" ).children( "a:first" ).addClass( "ui-state-active" );
332 332
 
333  
-		this.timer = this._delay(function() {
334  
-			this._close();
335  
-		}, this.delay );
  333
+		if ( event.type === "keydown" ) {
  334
+            this._close();
  335
+        } else {
  336
+            this.timer = this._delay(function() {
  337
+				this._close();
  338
+			}, this.delay );
  339
+        }
336 340
 
337 341
 		nested = $( "> .ui-menu", item );
338 342
 		if ( nested.length && ( /^mouse/.test( event.type ) ) ) {

0 notes on commit 97cb7de

Please sign in to comment.
Something went wrong with that request. Please try again.