move viewport top to cursor on page navigate (#463)

pull/388/head
Ian Shehadeh 2023-07-11 11:58:29 -04:00 committed by GitHub
parent b39ba3585a
commit a9a5242159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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_.