Menubar: on a single-button menubar, ignore reopening the same menu

This commit is contained in:
jzaefferer 2011-03-17 15:44:09 +01:00
parent cb17d6d209
commit 80d6d358f2

View 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();