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/16082

Vanessae40baf4bcb2d
diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts
index db4c43d4ac..5cbd065894 100644
--- a/app/src/layout/dock/Files.ts
+++ b/app/src/layout/dock/Files.ts
@@ -914,6 +914,7 @@ data-type="navigation-root" data-path="/">
let html = "";
let closeHtml = "";
let closeCounter = 0;
+ const scrollTop = this.element.scrollTop;
window.siyuan.notebooks.forEach((item) => {
if (item.closed) {
closeCounter++;
@@ -931,10 +932,11 @@ data-type="navigation-root" data-path="/">
} else {
this.closeElement.classList.add("fn__none");
}
- window.siyuan.storage[Constants.LOCAL_FILESPATHS].forEach((item: IFilesPath) => {
- item.openPaths.forEach((openPath) => {
- this.selectItem(item.notebookId, openPath, undefined, false, false);
- });
+ window.siyuan.storage[Constants.LOCAL_FILESPATHS].forEach(async (item: IFilesPath) => {
+ for (const openPath of item.openPaths) {
+ await this.selectItem(item.notebookId, openPath, undefined, false, false);
+ }
+ this.element.scrollTop = scrollTop;
});
this.refreshPublishAccessSwitch();
if (!init) {