Skip to content

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

:bug: 聚焦返回时 protyle.contentElement.scrollTop 不等于 0,会导致滚动加载,从而导致 showAll 为 false

Vanessa4d0290783bb4
diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts
index f497ac018a..0ab1de1109 100644
--- a/app/src/protyle/util/onGet.ts
+++ b/app/src/protyle/util/onGet.ts
@@ -76,6 +76,7 @@ export const onGet = (data: IWebSocketData, protyle: IProtyle, action: string[]
protyle.block.id = data.data.id;
protyle.scroll.lastScrollTop = 0;
protyle.contentElement.scrollTop = 0;
+ preventScroll(protyle); // 聚焦返回时 protyle.contentElement.scrollTop 不等于 0,会导致滚动加载,从而导致 showAll 为 false
protyle.wysiwyg.element.setAttribute("data-doc-type", data.data.type);
}