Improve scrolling on mobile

This commit is contained in:
2025-08-28 00:19:46 -07:00
parent f43d79769c
commit bf5690cacd
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ body {
} }
.app { .app {
height: 100vh; height: 100dvh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
+2 -1
View File
@@ -1,5 +1,5 @@
import { EditorState } from '@codemirror/state'; import { EditorState } from '@codemirror/state';
import { keymap, EditorView } from '@codemirror/view'; import { keymap, EditorView, scrollPastEnd } from '@codemirror/view';
import { defaultKeymap, history, historyKeymap } from '@codemirror/commands'; import { defaultKeymap, history, historyKeymap } from '@codemirror/commands';
import { import {
defaultHighlightStyle, defaultHighlightStyle,
@@ -33,6 +33,7 @@ function Editor(props: EditorProps) {
EditorView.lineWrapping, EditorView.lineWrapping,
history(), history(),
keymap.of([...defaultKeymap, ...historyKeymap]), keymap.of([...defaultKeymap, ...historyKeymap]),
scrollPastEnd(),
syntaxHighlighting(defaultHighlightStyle, { fallback: true }), syntaxHighlighting(defaultHighlightStyle, { fallback: true }),
yCollab(ydoc.getText(), null), yCollab(ydoc.getText(), null),
], ],