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

Vanessa3736319e5154
diff --git a/app/src/util/highlightById.ts b/app/src/util/highlightById.ts
index 210f9866b6..08f97f3b33 100644
--- a/app/src/util/highlightById.ts
+++ b/app/src/util/highlightById.ts
@@ -47,7 +47,7 @@ export const scrollCenter = (protyle: IProtyle, nodeElement?: Element, top = fal
if (blockElement.classList.contains("code-block")) {
const brElement = document.createElement("br");
range.insertNode(brElement);
- brElement.scrollIntoView({block: "center", behavior});
+ brElement.scrollIntoView({block: "nearest", behavior});
brElement.remove();
return;
}