Fixed persistent menu bar after clicking on an entry
parent
eff220de5d
commit
b82267d67f
|
@ -85,9 +85,12 @@ namespace top_menu {
|
|||
if(this._callback_click && !disabled) {
|
||||
this._callback_click();
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
if(disabled)
|
||||
event.stopPropagation();
|
||||
else
|
||||
HTMLMenuBarDriver.instance().close();
|
||||
});
|
||||
|
||||
this._submenu_tag = $.spawn("div").addClass("sub-menu");
|
||||
|
@ -183,7 +186,7 @@ namespace top_menu {
|
|||
item._label_tag.on('click', enable_event => {
|
||||
enable_event.preventDefault();
|
||||
|
||||
this.html_tag.find(".active").removeClass("active");
|
||||
this.close();
|
||||
item.html_tag.addClass("active");
|
||||
|
||||
setTimeout(() => {
|
||||
|
@ -198,6 +201,10 @@ namespace top_menu {
|
|||
return item;
|
||||
}
|
||||
|
||||
close() {
|
||||
this.html_tag.find(".active").removeClass("active");
|
||||
}
|
||||
|
||||
delete_item(item: MenuItem) {
|
||||
return undefined;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue