From a256e05df5e3765f6e0db15b5c842a3927542572 Mon Sep 17 00:00:00 2001 From: jzaefferer Date: Mon, 28 Feb 2011 22:36:41 +0100 Subject: [PATCH] Menu: Move addClass(active) call to _open to make it work for both mouse and keyboard interactions --- ui/jquery.ui.menu.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() {