Fix: move isClean into unbeforeunload handler
This commit is contained in:
parent
3011ba836d
commit
9a8c19b09b
14
edit/edit.js
14
edit/edit.js
|
@ -582,15 +582,15 @@ window.onbeforeunload = () => {
|
|||
updateLintReportIfEnabled(null, 0);
|
||||
// neither confirm() nor custom messages work in modern browsers but just in case
|
||||
return t('styleChangesNotSaved');
|
||||
};
|
||||
|
||||
function isClean() {
|
||||
if (editor) {
|
||||
return !editor.isDirty();
|
||||
} else {
|
||||
return isCleanGlobal();
|
||||
function isClean() {
|
||||
if (editor) {
|
||||
return !editor.isDirty();
|
||||
} else {
|
||||
return isCleanGlobal();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function addAppliesTo(list, name, value) {
|
||||
const showingEverything = $('.applies-to-everything', list) !== null;
|
||||
|
|
Loading…
Reference in New Issue
Block a user