-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
None
-
3
-
Iteration Light Year, Iteration Milky Way, Iteration Neptune, Iteration Ozone, Iteration Planetarium
-
Developer Tools
We should add a beforeunload event handler that will prevent the page from reloading / unloading if tabs are "dirty", this event will cover both page reloads in browser and exiting the app in electron. In the browser environment this automatically prompts user with a browser dialog that covers our case of warning, but in electron it just silently prevents reload from happening, so we need to account for that.
Another thing to consider here is how it interacts with the warning we show already in compass desktop on Ctrl+Q press, we probably don't want two warnings to show in sequence in that case?
This also has implications on our e2e tests that we should figure out how to handle when adding this event listener