Skip to content

Commit

Permalink
Menu: Move addClass(active) call to _open to make it work for both mouse
Browse files Browse the repository at this point in the history
and keyboard interactions
  • Loading branch information
jzaefferer committed Feb 28, 2011
1 parent 31a181a commit a256e05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/jquery.ui.menu.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ $.widget("ui.menu", {
var nested = $(">ul", item); var nested = $(">ul", item);
if (nested.length && /^mouse/.test(event.type)) { if (nested.length && /^mouse/.test(event.type)) {
self._open(nested); self._open(nested);
this.active.find(">a:first").addClass("ui-state-active");
} }
this.activeMenu = item.parent(); this.activeMenu = item.parent();


Expand Down Expand Up @@ -253,6 +252,8 @@ $.widget("ui.menu", {
); );


submenu.show().position(position); submenu.show().position(position);

this.active.find(">a:first").addClass("ui-state-active");
}, },


closeAll: function() { closeAll: function() {
Expand Down

0 comments on commit a256e05

Please sign in to comment.