Page 1 of 1

Browser Exit Warning

PostPosted: Thu Feb 20, 2020 12:24 pm
by John Robin Dove
Browser Exit warning used to work well but now it seems to fail. It triggers an object but does not stop the page being left. I am using Firefox.
UPDATE
I've just done some testing amd browserExitWarning still works with Internet Explorer but not Firefox, Chrome and Edge.

UPDATE 2
Oops. Sorry. False alarm. I just read this on Stack Overflow "In Firefox you MUST do some real interaction with the page in order for this message to appear to the user." And yes, it's true so no further action required.

Re: Browser Exit Warning

PostPosted: Thu Feb 20, 2020 3:21 pm
by Clifton
A login page takes care of interaction allowing the browserExitWarning() function to work.
Then you can activate or deactivate the exit warning message depending on the purpose that is being served.

I use it in our new LearnToType.Today program to alert logged in users if they try and close the browser window without logging out.