From: jzaefferer Date: Mon, 28 Feb 2011 21:36:41 +0000 (+0100) Subject: Menu: Move addClass(active) call to _open to make it work for both mouse X-Git-Tag: 1.9m5~250 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a256e05df5e3765f6e0db15b5c842a3927542572;p=jquery-ui.git Menu: Move addClass(active) call to _open to make it work for both mouse and keyboard interactions --- diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index f51c261d4..5bdb2bf7a 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -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() {