From dd6be581b70c928330aab77a16c15746c5f6095d Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 10 Apr 2024 18:01:28 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/10968 --- app/src/layout/dock/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/layout/dock/index.ts b/app/src/layout/dock/index.ts index 9c7b3f316..52de07d25 100644 --- a/app/src/layout/dock/index.ts +++ b/app/src/layout/dock/index.ts @@ -30,6 +30,7 @@ export class Dock { public resizeElement: HTMLElement; public pin = true; public data: { [key: string]: Model | boolean }; + private hideResizeTimeout:number constructor(options: { app: App, @@ -360,6 +361,7 @@ export class Dock { this.layout.element.style.height = "0px"; } this.resizeElement.classList.add("fn__none"); + clearTimeout(this.hideResizeTimeout); this.hideDock(); } if ((type === "graph" || type === "globalGraph") && this.layout.element.querySelector(".fullscreen")) { @@ -516,7 +518,7 @@ export class Dock { } if (this.pin) { this.layout.element.style.opacity = ""; - setTimeout(() => { + this.hideResizeTimeout = window.setTimeout(() => { this.resizeElement.classList.remove("fn__none"); }, 200); // 需等待动画完毕后再出现,否则会出现滚动条 https://ld246.com/article/1676596622064 }