From dfb9db34c39186329c308910eba7e955f39aa427 Mon Sep 17 00:00:00 2001 From: eight Date: Mon, 4 Feb 2019 03:00:13 +0800 Subject: [PATCH] Fix: update live preview when the style is toggled/replaced (#662) --- edit/sections-editor.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/edit/sections-editor.js b/edit/sections-editor.js index 7e2f8063..99772f2b 100644 --- a/edit/sections-editor.js +++ b/edit/sections-editor.js @@ -197,6 +197,7 @@ function createSectionsEditor({style, onTitleChanged}) { dirty.modify('enabled', style.enabled, newValue); style.enabled = newValue; enabledEl.checked = newValue; + updateLivePreview(); } function nextEditor(cm, cycle = true) { @@ -565,6 +566,7 @@ function createSectionsEditor({style, onTitleChanged}) { $('#heading').textContent = t('editStyleHeading'); } livePreview.show(Boolean(style.id)); + updateLivePreview(); }); function reinit() {