Commit 3ea63a10 by Daniel Lee

fix for unsaved changes popup on tab close/refresh

Incorrect return values in onbeforeunload event handler mean that the
unsaved changes popup is shown despite there being no changes.
parent 04b97529
......@@ -35,12 +35,12 @@ export class Tracker {
$window.onbeforeunload = () => {
if (this.ignoreChanges()) {
return '';
return null;
}
if (this.hasChanges()) {
return 'There are unsaved changes to this dashboard';
}
return '';
return null;
};
scope.$on('$locationChangeStart', (event, next) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment