LeaVerou/dabblet — Issue #40: beforeunload must return a string and not prompt anything
Author: rudiedirkx
Created: 2011-12-16 08:36:01+00:00
State: open

It would be insanely annoying and obtrusive if the browser could hassle the client with custom `confirm()` popups `onbeforeunload`.

The app now tries to prompt. Incorrect. Chrome dev tools tell me this: http://screencast.com/t/wzHmfxJG3c

Correct: https://developer.mozilla.org/en/DOM/window.onbeforeunload

window.onbeforeunload = function() {
return 'You have unsaved changes. Are you sure?'
}