mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Prevent unloading of browser window when popups (like composer window) are open.
This commit is contained in:
parent
8eaf9dc9c3
commit
f2d172de7d
2 changed files with 7 additions and 1 deletions
|
|
@ -72,7 +72,7 @@ import { LoginUserScreen } from 'Screen/User/Login';
|
|||
import { MailBoxUserScreen } from 'Screen/User/MailBox';
|
||||
import { SettingsUserScreen } from 'Screen/User/Settings';
|
||||
|
||||
import { startScreens, showScreenPopup } from 'Knoin/Knoin';
|
||||
import { startScreens, showScreenPopup, arePopupsVisible } from 'Knoin/Knoin';
|
||||
|
||||
import { AbstractApp } from 'App/Abstract';
|
||||
|
||||
|
|
@ -851,6 +851,7 @@ class AppUser extends AbstractApp {
|
|||
super.bootstart();
|
||||
|
||||
addEventListener('resize', () => leftPanelDisabled(ThemeStore.isMobile() || 1000 > innerWidth));
|
||||
addEventListener('beforeunload', event => arePopupsVisible() && event.preventDefault() , {capture: true});
|
||||
|
||||
NotificationUserStore.populate();
|
||||
AccountUserStore.populate();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue