From 35969c4bdfccfd48cdd716cdbdde5eab2970fcb0 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 28 Mar 2024 11:35:38 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/10702 --- app/src/protyle/wysiwyg/keydown.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index e229ec314..feec26d01 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -519,10 +519,10 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { // 向上/下滚动一屏 if (!event.altKey && !event.shiftKey && isNotCtrl(event) && (event.key === "PageUp" || event.key === "PageDown")) { if (event.key === "PageUp") { - protyle.contentElement.scrollTop = protyle.contentElement.scrollTop - protyle.contentElement.clientHeight; + protyle.contentElement.scrollTop = protyle.contentElement.scrollTop - protyle.contentElement.clientHeight + 60; protyle.scroll.lastScrollTop = protyle.contentElement.scrollTop + 1; } else { - protyle.contentElement.scrollTop = protyle.contentElement.scrollTop + protyle.contentElement.clientHeight; + protyle.contentElement.scrollTop = protyle.contentElement.scrollTop + protyle.contentElement.clientHeight - 60; protyle.scroll.lastScrollTop = protyle.contentElement.scrollTop - 1; } const contentRect = protyle.contentElement.getBoundingClientRect();