Skip to content

Commit

Permalink
🎨 fix #10702
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Mar 28, 2024
1 parent e75c926 commit 35969c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/protyle/wysiwyg/keydown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 35969c4

Please sign in to comment.