Skip to content

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

:bug: fix https://github.com/siyuan-note/siyuan/issues/9891

Vanessa08a8d8e8c1ad
diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts
index 0262c53eed..94ee3ce6ca 100644
--- a/app/src/protyle/util/onGet.ts
+++ b/app/src/protyle/util/onGet.ts
@@ -395,6 +395,9 @@ const focusElementById = (protyle: IProtyle, action: string[], scrollAttr?: IScr
focusElement.scrollIntoView();
} else if (scrollAttr && scrollAttr.scrollTop) {
protyle.contentElement.scrollTop = scrollAttr.scrollTop;
+ } else {
+ protyle.observerLoad?.disconnect();
+ return;
}
// 加强定位
protyle.observerLoad = new ResizeObserver(() => {
@@ -409,7 +412,7 @@ const focusElementById = (protyle: IProtyle, action: string[], scrollAttr?: IScr
setTimeout(() => {
protyle.observerLoad.disconnect();
protyle.observer.observe(protyle.wysiwyg.element);
- }, 1000 * 16);
+ }, 1000 * 3);
if (focusElement.isSameNode(protyle.wysiwyg.element.firstElementChild)) {
protyle.observerLoad.disconnect();