This commit is contained in:
Vanessa 2023-11-02 11:20:02 +08:00
parent d93bd7cfe5
commit 76b0617689
6 changed files with 159 additions and 145 deletions

View file

@ -1259,12 +1259,6 @@ export const windowKeyDown = (app: App, event: KeyboardEvent) => {
return;
}
const avElement = document.querySelector(".av__panel");
if (avElement) {
avElement.remove();
return;
}
if (!window.siyuan.menus.menu.element.classList.contains("fn__none")) {
if (window.siyuan.dialogs.length > 0 &&
window.siyuan.menus.menu.element.style.zIndex < (window.siyuan.dialogs[0].element.querySelector(".b3-dialog") as HTMLElement).style.zIndex) {
@ -1280,6 +1274,13 @@ export const windowKeyDown = (app: App, event: KeyboardEvent) => {
return;
}
// 需放在 menus 后,否则资源列中添加资源会先关闭菜单
const avElement = document.querySelector(".av__panel");
if (avElement) {
avElement.remove();
return;
}
// remove blockpopover
const maxEditLevels: { [key: string]: number } = {oid: 0};
window.siyuan.blockPanels.forEach((item) => {