aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2011-02-28 22:36:41 +0100
committerjzaefferer <joern.zaefferer@gmail.com>2011-02-28 22:36:41 +0100
commita256e05df5e3765f6e0db15b5c842a3927542572 (patch)
tree2a235b8f208a8501988665c20e78baaa63a13569
parent31a181abfc05334eca8e9875e17746fcb01515d8 (diff)
downloadjquery-ui-a256e05df5e3765f6e0db15b5c842a3927542572.tar.gz
jquery-ui-a256e05df5e3765f6e0db15b5c842a3927542572.zip
Menu: Move addClass(active) call to _open to make it work for both mouse
and keyboard interactions
-rw-r--r--ui/jquery.ui.menu.js3
1 files changed, 2 insertions, 1 deletions
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() {