From eda34f2c7e6238794e16600d8ea8a77e53d2bca7 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 2 Jan 2025 22:55:18 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/13548 --- app/src/layout/Tab.ts | 10 ++++++++++ app/src/layout/Wnd.ts | 1 + 2 files changed, 11 insertions(+) diff --git a/app/src/layout/Tab.ts b/app/src/layout/Tab.ts index 8bc41cd67..6a896491c 100644 --- a/app/src/layout/Tab.ts +++ b/app/src/layout/Tab.ts @@ -48,6 +48,16 @@ export class Tab { this.headElement.addEventListener("mouseenter", (event) => { event.stopPropagation(); event.preventDefault(); + const dragElement = Array.from(this.headElement.parentElement.childNodes).find((item: HTMLElement) => { + if (item.style?.opacity === "0.1") { + return true; + } + }); + if (dragElement) { + hideTooltip(); + return; + } + let id = ""; if (this.model instanceof Editor && this.model.editor?.protyle?.block?.rootID) { id = (this.model as Editor).editor.protyle.block.rootID; diff --git a/app/src/layout/Wnd.ts b/app/src/layout/Wnd.ts index c4fa7f647..d4dc45067 100644 --- a/app/src/layout/Wnd.ts +++ b/app/src/layout/Wnd.ts @@ -219,6 +219,7 @@ export class Wnd { } return; } + it.classList.remove("layout-tab-bars--drag"); if (!newTabHeaderElement.isSameNode(oldTabHeaderElement) && ((oldTabHeaderElement.classList.contains("item--pin") && newTabHeaderElement.classList.contains("item--pin")) || (!oldTabHeaderElement.classList.contains("item--pin") && !newTabHeaderElement.classList.contains("item--pin")))) {