]> source.dussan.org Git - jquery-ui.git/commitdiff
Menu: Move addClass(active) call to _open to make it work for both mouse
authorjzaefferer <joern.zaefferer@gmail.com>
Mon, 28 Feb 2011 21:36:41 +0000 (22:36 +0100)
committerjzaefferer <joern.zaefferer@gmail.com>
Mon, 28 Feb 2011 21:36:41 +0000 (22:36 +0100)
and keyboard interactions

ui/jquery.ui.menu.js

index f51c261d44e5bcfe893699f63c14b08e48595237..5bdb2bf7a25bc641b1fdca4aa07553f5c9e80654 100644 (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() {