]> source.dussan.org Git - jquery-ui.git/commitdiff
Menubar: on a single-button menubar, ignore reopening the same menu
authorjzaefferer <joern.zaefferer@gmail.com>
Thu, 17 Mar 2011 14:44:09 +0000 (15:44 +0100)
committerjzaefferer <joern.zaefferer@gmail.com>
Thu, 17 Mar 2011 14:44:09 +0000 (15:44 +0100)
tests/visual/menu/menubar.js

index 3f4dba723683ce45d511b35b5aed8c169520b2a5..40ac2819d8d0092131398b80c757b642f559a741 100644 (file)
@@ -127,6 +127,10 @@ $.widget("ui.menubar", {
        },
        
        _open: function(event, menu) {
+               // on a single-button menubar, ignore reopening the same menu
+               if (this.active && this.active[0] == menu[0]) {
+                       return;
+               }
                // almost the same as _close above, but don't remove tabIndex
                if (this.active) {
                        this.active.menu("closeAll").hide();