diff --git a/edit/edit.js b/edit/edit.js index 02755ce9..d86adc92 100644 --- a/edit/edit.js +++ b/edit/edit.js @@ -89,6 +89,7 @@ lazyInit(); dirty.onChange(updateDirty); await editor.ready; + setTimeout(() => editor.getEditors().forEach(linter.enableForEditor)); // enabling after init to prevent flash of validation failure on an empty name $('#name').required = !editor.isUsercss; $('#save-button').onclick = editor.save; diff --git a/edit/sections-editor.js b/edit/sections-editor.js index 1279845b..6f71e83d 100644 --- a/edit/sections-editor.js +++ b/edit/sections-editor.js @@ -517,7 +517,6 @@ function SectionsEditor() { if (!originalSections.length) { setGlobalProgress(); requestAnimationFrame(fitToAvailableSpace); - sections.forEach(({cm}) => setTimeout(linter.enableForEditor, 0, cm)); done(); } else { setTimeout(chunk); diff --git a/edit/source-editor.js b/edit/source-editor.js index 972138a3..eaa95e7b 100644 --- a/edit/source-editor.js +++ b/edit/source-editor.js @@ -90,7 +90,6 @@ function SourceEditor() { linter.run(); updateLinterSwitch(); }); - debounce(linter.enableForEditor, 0, cm); if (!$.isTextInput(document.activeElement)) { cm.focus(); }