Fix: onbeforeunload handler would disable the save button

This commit is contained in:
eight 2017-10-07 18:10:00 +08:00
parent 40a1781a53
commit 765231581c

View File

@ -502,7 +502,7 @@ window.onbeforeunload = () => {
rememberWindowSize(); rememberWindowSize();
} }
document.activeElement.blur(); document.activeElement.blur();
if (isCleanGlobal() && (!editor || !editor.isDirty())) { if ((!editor && isCleanGlobal()) || (editor && !editor.isDirty())) {
return; return;
} }
updateLintReportIfEnabled(null, 0); updateLintReportIfEnabled(null, 0);