mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-29 15:26:09 +00:00
Also prevent browser unload in Chrome
This commit is contained in:
@@ -851,7 +851,12 @@ class AppUser extends AbstractApp {
|
||||
super.bootstart();
|
||||
|
||||
addEventListener('resize', () => leftPanelDisabled(ThemeStore.isMobile() || 1000 > innerWidth));
|
||||
addEventListener('beforeunload', event => arePopupsVisible() && event.preventDefault() , {capture: true});
|
||||
addEventListener('beforeunload', event => {
|
||||
if (arePopupsVisible()) {
|
||||
event.preventDefault();
|
||||
return event.returnValue = "Are you sure you want to exit?";
|
||||
}
|
||||
}, {capture: true});
|
||||
|
||||
NotificationUserStore.populate();
|
||||
AccountUserStore.populate();
|
||||
|
||||
Reference in New Issue
Block a user