mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-06 08:08:10 +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
|
# 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
|
# throttled in case more work needs to be done before closing
|
||||||
|
|
||||||
# In Electron, returning false cancels the close.
|
# In Electron, returning any value other than undefined cancels the close.
|
||||||
return @runUnloadCallbacks()
|
canCloseWindow = @runUnloadCallbacks()
|
||||||
|
return undefined if canCloseWindow
|
||||||
|
return false
|
||||||
|
|
||||||
window.onunload = =>
|
window.onunload = =>
|
||||||
NylasEnv.storeWindowDimensions()
|
NylasEnv.storeWindowDimensions()
|
||||||
|
|
Loading…
Reference in a new issue