don't rebuild editor DOM on save, fixes #1380
This commit is contained in:
parent
51e56110e8
commit
ba9d904ccc
|
@ -108,9 +108,8 @@ function SectionsEditor() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
newStyle = await API.styles.editSave(newStyle);
|
newStyle = await API.styles.editSave(newStyle);
|
||||||
destroyRemovedSections();
|
|
||||||
sessionStore.justEditedStyleId = newStyle.id;
|
sessionStore.justEditedStyleId = newStyle.id;
|
||||||
editor.replaceStyle(newStyle, false);
|
dirty.clear();
|
||||||
},
|
},
|
||||||
|
|
||||||
scrollToEditor(cm) {
|
scrollToEditor(cm) {
|
||||||
|
@ -453,18 +452,6 @@ function SectionsEditor() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function destroyRemovedSections() {
|
|
||||||
for (let i = 0; i < sections.length;) {
|
|
||||||
if (!sections[i].removed) {
|
|
||||||
i++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
sections[i].destroy();
|
|
||||||
sections[i].el.remove();
|
|
||||||
sections.splice(i, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateMeta() {
|
function updateMeta() {
|
||||||
$('#name').value = style.customName || style.name || '';
|
$('#name').value = style.customName || style.name || '';
|
||||||
$('#enabled').checked = style.enabled !== false;
|
$('#enabled').checked = style.enabled !== false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user