When using "window.onbeforeunload" in firefox, it returns only a generic message as the image below:
IsthereanywayIcancustomizethismessageina"modal" in firefox?
When using "window.onbeforeunload" in firefox, it returns only a generic message as the image below:
IsthereanywayIcancustomizethismessageina"modal" in firefox?
Unfortunately, no it is possible to override the default message in Firefox.
The beforeunload
event uses an internal browser method to stop closing / browsing. In the function assigned to the event, you must return a string that will be added to the default browser message. This in all browsers LESS Firefox, which only displays your own message.
Event documentation on the Mozilla Developer Network: link
Documentation on MSDN: link