Menu: Move addClass(active) call to _open to make it work for both mouse

and keyboard interactions
This commit is contained in:
jzaefferer 2011-02-28 22:36:41 +01:00
parent 31a181abfc
commit a256e05df5

View File

@ -219,7 +219,6 @@ $.widget("ui.menu", {
var nested = $(">ul", item);
if (nested.length && /^mouse/.test(event.type)) {
self._open(nested);
this.active.find(">a:first").addClass("ui-state-active");
}
this.activeMenu = item.parent();
@ -253,6 +252,8 @@ $.widget("ui.menu", {
);
submenu.show().position(position);
this.active.find(">a:first").addClass("ui-state-active");
},
closeAll: function() {