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