I am using vue-codemirror 6 with Vue3 and Typescript, how i can scroll to the bottom when load? this below not working.
<Codemirror
@ready="handleReady"
@change="handleChange"
ref="cm"
:basic="true"
v-model="getMigrationSessionLog.message" />
// Codemirror EditorView instance ref
const cm = shallowRef();
const handleReady = (payload: any) => {
cm.value = payload.view;
const state = cm.value.state;
const lines = state.doc.lines;
cm.value.dispatch({ selection: { anchor: lines - 1, head: 5 }, scrollIntoView: true });
};
[Vue warn]: Error in component event handler: “RangeError: Selection points outside of document”