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

Vanessa36832454202e
diff --git a/app/src/util/backForward.ts b/app/src/util/backForward.ts
index f9fc76328f..bb4966c3de 100644
--- a/app/src/util/backForward.ts
+++ b/app/src/util/backForward.ts
@@ -104,7 +104,7 @@ const focusStack = async (app: App, stack: IBackStack) => {
}
});
focusByOffset(getContenteditableElement(blockElement), stack.position.start, stack.position.end);
- scrollCenter(protyle);
+ scrollCenter(protyle, blockElement, "start");
}
return true;
} else {
@@ -136,7 +136,7 @@ const focusStack = async (app: App, stack: IBackStack) => {
stack.protyle.model.parent.parent.switchTab(stack.protyle.model.parent.headElement);
}
focusByOffset(getContenteditableElement(blockElement), stack.position.start, stack.position.end);
- scrollCenter(stack.protyle);
+ scrollCenter(stack.protyle, blockElement, "start");
getAllModels().outline.forEach(item => {
if (item.blockId === stack.protyle.block.rootID) {
item.setCurrent(blockElement);
@@ -179,7 +179,7 @@ const focusStack = async (app: App, stack: IBackStack) => {
}
});
focusByOffset(getContenteditableElement(blockElement), stack.position.start, stack.position.end);
- scrollCenter(stack.protyle);
+ scrollCenter(stack.protyle, blockElement, "start");
}
});
});
@@ -207,7 +207,7 @@ const focusStack = async (app: App, stack: IBackStack) => {
}
});
focusByOffset(getContenteditableElement(blockElement), stack.position.start, stack.position.end);
- scrollCenter(stack.protyle);
+ scrollCenter(stack.protyle, blockElement, "start");
}
});
return true;