fixup 8ca7c363: focus() must be the last action

This commit is contained in:
tophf 2017-11-15 11:33:37 +03:00
parent 82651ed6cd
commit 15c98bac9e

View File

@ -49,7 +49,6 @@ function createSourceEditor(style) {
const cm = CodeMirror.fromTextArea($('#sections textarea'));
// too many functions depend on this global
editors.push(cm);
cm.focus();
// draw metas info
updateMeta();
@ -60,6 +59,9 @@ function createSourceEditor(style) {
initLint();
initLinterSwitch();
// focus must be the last action, otherwise the style is duplicated on saving
cm.focus();
function initAppliesToLineWidget() {
const PREF_NAME = 'editor.appliesToLineWidget';
const widget = createAppliesToLineWidget(cm);