mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 01:20:12 +01:00
This commit is contained in:
parent
7fe3f7e2d2
commit
12ee5d5c4d
3 changed files with 26 additions and 5 deletions
|
|
@ -7,7 +7,7 @@ import {initNavigationMenu, initFileMenu} from "./navigation";
|
|||
import {initTabMenu} from "./tab";
|
||||
/// #endif
|
||||
import {Menu} from "./Menu";
|
||||
import {hasTopClosestByTag} from "../protyle/util/hasClosest";
|
||||
import {hasClosestByClassName, hasTopClosestByTag} from "../protyle/util/hasClosest";
|
||||
import {App} from "../index";
|
||||
|
||||
|
||||
|
|
@ -73,6 +73,12 @@ export class Menus {
|
|||
break;
|
||||
}
|
||||
|
||||
if (hasClosestByClassName(target, "av__panel") && !hasClosestByClassName(target, "b3-menu")) {
|
||||
document.querySelector(".av__panel").dispatchEvent(new CustomEvent("click", {detail: "close"}))
|
||||
event.stopPropagation();
|
||||
break;
|
||||
}
|
||||
|
||||
target = target.parentElement;
|
||||
}
|
||||
}, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue