Re:Don't allow popups during page unload
by strictnein on Sunday December 23, 2018 @01:37PM
(#18747565)
That's not the window.open() call, which doesn't stop the browser window from closing. It's (I believe) a window.confirm call: https://developer.mozilla.org/en-US/docs/Web/API/Window/conf...
I believe closing gmail browser window while composing a message would show a popup.
I use it in an app where editing an item locks it for everyone else and to unlock it, one needs to save or cancel the edit. So closing the browser tab while editing shows a warning.
Edit: I was corrected by the comment below. Had in mind a different function.