From 353cf08fd9e740544ebbc5ca31c0f8028d005ff9 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 25 Dec 2024 19:38:21 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/13551 --- app/src/layout/Wnd.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/layout/Wnd.ts b/app/src/layout/Wnd.ts index 9a5082a50..8576462fd 100644 --- a/app/src/layout/Wnd.ts +++ b/app/src/layout/Wnd.ts @@ -894,7 +894,6 @@ export class Wnd { if (this.children.length > window.siyuan.config.fileTree.maxOpenTabCount) { this.removeOverCounter(); } - this.switchTab(tab.headElement); const oldWnd = tab.parent; if (oldWnd.children.length === 1) { @@ -922,6 +921,10 @@ export class Wnd { } } } + + // https://github.com/siyuan-note/siyuan/issues/13551 + this.switchTab(tab.headElement); + tab.parent = this; hideAllElements(["toolbar"]); /// #if !BROWSER