diff options
author | jzaefferer <joern.zaefferer@gmail.com> | 2011-02-28 22:36:41 +0100 |
---|---|---|
committer | jzaefferer <joern.zaefferer@gmail.com> | 2011-02-28 22:36:41 +0100 |
commit | a256e05df5e3765f6e0db15b5c842a3927542572 (patch) | |
tree | 2a235b8f208a8501988665c20e78baaa63a13569 | |
parent | 31a181abfc05334eca8e9875e17746fcb01515d8 (diff) | |
download | jquery-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.js | 3 |
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() { |