dedupe linter.enableForEditor calls
This commit is contained in:
parent
184b6d4f7c
commit
a06697808f
|
@ -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;
|
||||
|
|
|
@ -517,7 +517,6 @@ function SectionsEditor() {
|
|||
if (!originalSections.length) {
|
||||
setGlobalProgress();
|
||||
requestAnimationFrame(fitToAvailableSpace);
|
||||
sections.forEach(({cm}) => setTimeout(linter.enableForEditor, 0, cm));
|
||||
done();
|
||||
} else {
|
||||
setTimeout(chunk);
|
||||
|
|
|
@ -90,7 +90,6 @@ function SourceEditor() {
|
|||
linter.run();
|
||||
updateLinterSwitch();
|
||||
});
|
||||
debounce(linter.enableForEditor, 0, cm);
|
||||
if (!$.isTextInput(document.activeElement)) {
|
||||
cm.focus();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user