Improve scrolling on mobile
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.app {
|
.app {
|
||||||
height: 100vh;
|
height: 100dvh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user