From 89e955bcf1da88d39ef745fd84daf77b3d44e221 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 13 Mar 2023 22:28:36 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/7632?utm_source=ld246.com --- app/src/util/highlightById.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/util/highlightById.ts b/app/src/util/highlightById.ts index e31f588f2..736287883 100644 --- a/app/src/util/highlightById.ts +++ b/app/src/util/highlightById.ts @@ -44,8 +44,8 @@ export const scrollCenter = (protyle: IProtyle, nodeElement?: Element, top = fal const cursorTop = getSelectionPosition(editorElement).top - editorElement.getBoundingClientRect().top; if (cursorTop < 0) { editorElement.scrollTop = editorElement.scrollTop + cursorTop; - } else if (cursorTop > editorElement.clientHeight - 34) { - editorElement.scrollTop = editorElement.scrollTop + (cursorTop + 34 - editorElement.clientHeight); + } else if (cursorTop > editorElement.clientHeight - 74) { // 74 = 移动端底部 + 段落块高度 + editorElement.scrollTop = editorElement.scrollTop + (cursorTop + 74 - editorElement.clientHeight); } return; }