diff --git a/src/lib/components/Editor.svelte b/src/lib/components/Editor.svelte index c4fc11e6..486e07a1 100644 --- a/src/lib/components/Editor.svelte +++ b/src/lib/components/Editor.svelte @@ -30,6 +30,7 @@ const newText = editorMode === 'code' ? code : mermaid; if (newText !== text) { // console.log('updating editor text', newText); + editor.setScrollTop(0); editor.setValue(newText); text = newText; }