Skip to content

Commit

Permalink
Menu: Fix issue with missing active item when clicking a menu item mo…
Browse files Browse the repository at this point in the history
…re than once
  • Loading branch information
kborchers committed Jul 13, 2012
1 parent b8ad711 commit be0be89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/jquery.ui.menu.js
Expand Up @@ -583,7 +583,8 @@ $.widget( "ui.menu", {
select: function( event ) { select: function( event ) {
// Save active reference before collapseAll triggers blur // Save active reference before collapseAll triggers blur
var ui = { var ui = {
item: this.active // Selecting a menu item removes the active item causing multiple clicks to be missing an item
item: this.active || $( event.target ).closest( ".ui-menu-item" )
}; };
this.collapseAll( event, true ); this.collapseAll( event, true );
this._trigger( "select", event, ui ); this._trigger( "select", event, ui );
Expand Down

0 comments on commit be0be89

Please sign in to comment.