mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 19:00:54 -06:00
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.
This commit is contained in:
parent
04b9752932
commit
3ea63a1064
@ -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) => {
|
||||
|
Loading…
Reference in New Issue
Block a user