This commit is contained in:
Vanessa 2023-05-27 18:34:39 +08:00
parent 4704284ad2
commit 95c64975e8
8 changed files with 115 additions and 28 deletions

View file

@ -179,11 +179,13 @@ export class MenuItem {
if (this.element.getAttribute("disabled")) {
return;
}
options.click(this.element);
const result = options.click(this.element);
event.preventDefault();
event.stopImmediatePropagation();
event.stopPropagation();
window.siyuan.menus.menu.remove();
if (typeof result === "undefined" || !result) {
window.siyuan.menus.menu.remove();
}
});
}
if (options.id) {