mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +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();
|
||||
|
||||
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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue