mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Also prevent browser unload in Chrome
This commit is contained in:
parent
f2d172de7d
commit
bafc74fd09
1 changed files with 6 additions and 1 deletions
|
|
@ -851,7 +851,12 @@ class AppUser extends AbstractApp {
|
||||||
super.bootstart();
|
super.bootstart();
|
||||||
|
|
||||||
addEventListener('resize', () => leftPanelDisabled(ThemeStore.isMobile() || 1000 > innerWidth));
|
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();
|
NotificationUserStore.populate();
|
||||||
AccountUserStore.populate();
|
AccountUserStore.populate();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue