diff --git a/web_src/js/features/codeeditor.js b/web_src/js/features/codeeditor.js index a22043c9d4..0366afc2c0 100644 --- a/web_src/js/features/codeeditor.js +++ b/web_src/js/features/codeeditor.js @@ -17,6 +17,7 @@ const baseOptions = { rulers: false, scrollbar: {horizontalScrollbarSize: 6, verticalScrollbarSize: 6}, scrollBeyondLastLine: false, + automaticLayout: true, }; function getEditorconfig(input) { @@ -111,10 +112,6 @@ export async function createMonaco(textarea, filename, editorOpts) { textarea.dispatchEvent(new Event('change')); // seems to be needed for jquery-are-you-sure }); - window.addEventListener('resize', () => { - editor.layout(); - }); - exportEditor(editor); const loading = document.querySelector('.editor-loading');