diff --git a/edit/edit.js b/edit/edit.js index ea5fd9f3..5f78b641 100644 --- a/edit/edit.js +++ b/edit/edit.js @@ -341,7 +341,7 @@ function setCleanSection(section) { } function toggleStyle() { - $('#enabled').checked = !$('#enabled').checked; + $('#enabled').dispatchEvent(new MouseEvent('click', {bubbles: true})); } function save() { diff --git a/edit/source-editor.js b/edit/source-editor.js index ab909b8c..256e065d 100644 --- a/edit/source-editor.js +++ b/edit/source-editor.js @@ -186,6 +186,7 @@ function createSourceEditor(style) { dirty.modify('enabled', style.enabled, value); style.enabled = value; updateMeta(); + $('#enabled').dispatchEvent(new Event('change', {bubbles: true})); } function save() {