mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-04 07:10:06 +08:00
fix(beforeunload): Chrome 51 - return undefined to continue
This commit is contained in:
parent
1f27e00069
commit
e147b59ad0
1 changed files with 4 additions and 2 deletions
|
@ -38,8 +38,10 @@ class WindowEventHandler
|
|||
# Don't hide the window here if we don't want the renderer process to be
|
||||
# throttled in case more work needs to be done before closing
|
||||
|
||||
# In Electron, returning false cancels the close.
|
||||
return @runUnloadCallbacks()
|
||||
# In Electron, returning any value other than undefined cancels the close.
|
||||
canCloseWindow = @runUnloadCallbacks()
|
||||
return undefined if canCloseWindow
|
||||
return false
|
||||
|
||||
window.onunload = =>
|
||||
NylasEnv.storeWindowDimensions()
|
||||
|
|
Loading…
Reference in a new issue