🎨 menu

This commit is contained in:
Vanessa 2023-05-29 12:39:38 +08:00
parent e4b14a12c6
commit a3af4cf722
3 changed files with 3 additions and 8 deletions

View file

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