From b3e1507447bcb7a1dfe388d6e624453a8e0c0f76 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 25 Mar 2025 22:20:00 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E9=B8=BF=E8=92=99=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/dialog/index.ts | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/app/src/dialog/index.ts b/app/src/dialog/index.ts index 7f9649d1c..7933473b0 100644 --- a/app/src/dialog/index.ts +++ b/app/src/dialog/index.ts @@ -86,23 +86,26 @@ left:${left || "auto"};top:${top || "auto"}"> } public destroy(options?: IObject) { - // av 修改列头emoji后点击关闭emoji图标 - if ((this.element.querySelector(".b3-dialog") as HTMLElement).style.zIndex < window.siyuan.menus.menu.element.style.zIndex) { - // https://github.com/siyuan-note/siyuan/issues/6783 - window.siyuan.menus.menu.remove(); - } - this.element.remove(); - if (this.destroyCallback) { - this.destroyCallback(options); - } - window.siyuan.dialogs.find((item, index) => { - if (item.id === this.id) { - window.siyuan.dialogs.splice(index, 1); - return true; + this.element.classList.remove("b3-dialog--open"); + setTimeout(() => { + // av 修改列头emoji后点击关闭emoji图标 + if ((this.element.querySelector(".b3-dialog") as HTMLElement).style.zIndex < window.siyuan.menus.menu.element.style.zIndex) { + // https://github.com/siyuan-note/siyuan/issues/6783 + window.siyuan.menus.menu.remove(); } - }); - // https://github.com/siyuan-note/siyuan/issues/10475 - document.getElementById("drag")?.classList.remove("fn__hidden"); + this.element.remove(); + if (this.destroyCallback) { + this.destroyCallback(options); + } + window.siyuan.dialogs.find((item, index) => { + if (item.id === this.id) { + window.siyuan.dialogs.splice(index, 1); + return true; + } + }); + // https://github.com/siyuan-note/siyuan/issues/10475 + document.getElementById("drag")?.classList.remove("fn__hidden"); + }, Constants.TIMEOUT_DBLCLICK); } public bindInput(inputElement: HTMLInputElement | HTMLTextAreaElement, enterEvent?: () => void, bindEnter = true) {