Skip to content

Commit 56e18ee

Browse files
committed
fix: text mode loads partially scrolled down
1 parent e038087 commit 56e18ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/components/modes/textmode/TextMode.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,8 @@
618618
619619
codeMirrorView = new EditorView({
620620
state,
621-
parent: target
621+
parent: target,
622+
scrollTo: EditorView.scrollIntoView(0) // see https://discuss.codemirror.net/t/editor-starts-partially-scrolled-down/7567
622623
})
623624
624625
return codeMirrorView

0 commit comments

Comments
 (0)