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;
|
||||
}
|
||||
newStyle = await API.styles.editSave(newStyle);
|
||||
destroyRemovedSections();
|
||||
sessionStore.justEditedStyleId = newStyle.id;
|
||||
editor.replaceStyle(newStyle, false);
|
||||
dirty.clear();
|
||||
},
|
||||
|
||||
scrollToEditor(cm) {
|
||||
|
@ -453,18 +452,6 @@ function SectionsEditor() {
|
|||
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() {
|
||||
$('#name').value = style.customName || style.name || '';
|
||||
$('#enabled').checked = style.enabled !== false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user