Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/13551

Vanessa353cf08fd9e7
diff --git a/app/src/layout/Wnd.ts b/app/src/layout/Wnd.ts
index 9a5082a505..8576462fd9 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