window.onbeforeunload not working on Firefox 46 in a popup window, all other browsers work
Having an issue with Firefox 46, on all the other browsers it work fine. Upon exit from the page I ask the following question. Firefox ignores it completely. Help please! window.onbeforeunload = ThisCheckExittingPage; var ThisCheckExitWindow = 1; // Checks before exitting // ThisCheckExitWindow = 1; // Does NOT check before exitting // ThisCheckExitWindow = 0; function ThisCheckExittingPage() { if (ThisCheckExitWindow == 1) { return "You are about to exit this page."; } } This looks like by design, as WindowEventHandlers.onbeforeunload - Web APIs | MDN has this note: To combat unwanted pop-ups