diff --git a/edit/edit.js b/edit/edit.js index 733a11f1..b5135f29 100644 --- a/edit/edit.js +++ b/edit/edit.js @@ -597,7 +597,7 @@ window.onbeforeunload = () => { rememberWindowSize(); } document.activeElement.blur(); - if (isCleanGlobal()) { + if (isCleanGlobal() && (!editor || !editor.isDirty())) { return; } updateLintReportIfEnabled(null, 0); diff --git a/edit/source-editor.js b/edit/source-editor.js index a8f5b92e..ea9b86fb 100644 --- a/edit/source-editor.js +++ b/edit/source-editor.js @@ -138,5 +138,5 @@ function createSourceEditor(style) { }); } - return {replaceStyle, save, toggleStyle, updateStyleMeta}; + return {replaceStyle, save, toggleStyle, updateStyleMeta, isDirty: dirty.isDirty}; }