From a9a5242159841e697cb5125c6bc7f450ac503532 Mon Sep 17 00:00:00 2001 From: Ian Shehadeh Date: Tue, 11 Jul 2023 11:58:29 -0400 Subject: [PATCH] move viewport top to cursor on page navigate (#463) --- web/editor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/editor.tsx b/web/editor.tsx index 5622e32..9bf0f9e 100644 --- a/web/editor.tsx +++ b/web/editor.tsx @@ -448,7 +448,7 @@ export class Editor { } this.editorView.dispatch({ selection: { anchor: pos }, - scrollIntoView: true, + effects: EditorView.scrollIntoView(pos, { y: "start" }), }); } else if (!stateRestored) { // Somewhat ad-hoc way to determine if the document contains frontmatter and if so, putting the cursor _after it_.