From 3736319e51543da95c4e08203dbc144866531f7d Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 23 Nov 2024 20:34:20 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/12278 --- app/src/util/highlightById.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/util/highlightById.ts b/app/src/util/highlightById.ts index 210f9866b..08f97f3b3 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; }