use `window.onbeforeunload=` for nav-away warning...
use `window.onbeforeunload=` for nav-away warning
Firefox 22 broke `$(window).on("beforeunload")` somehow, for some reason,
resulting in always showing a dialog, regardless of the function's return value.
The only fix I could find was resorting to the basic low-level API.