Is `dom.disable_beforeunload` still necessary?
See original GitHub issueI got bit by this on a form I was building and testing on several browser for the typical user warning like “Hey the form is not complete yet do you want to close the page?”.
On a profile with arkenfox the warning is not triggered and the page is closed with form data lost.
I think the abuse of warning spam is something that got fixed (I believe?) by browsers some time ago by hardening the requirements to enable the beforeunload
event.
AFAICS last time this was touched was 5 years ago, is this still a concern?
Should there be a warning in the user.js comments informing of potential sideffects of the switch?
https://github.com/arkenfox/user.js/blob/f4187632faef76df4de0cbb0cdc7199f22fadd76/user.js#L611-L614
Thank you!
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Window: beforeunload event - Web APIs | MDN
The beforeunload event is fired when the window, the document and its resources are about to be unloaded. The document is still visible...
Read more >How to disable Warning by "onbeforeunload" when "reload ...
My code works well, but I do not need this "beforeunload warning" when reloadind same page (reload button ou F5 key) , or...
Read more >Sure you want to leave?—browser beforeunload event
In the video, I explain a bit about the beforeunload event—which lets you prompt or warn your user that they're about to leave...
Read more >How to disable beforeunload events (e.g. "Are you sure you ...
In Firefox you can completely disable beforeunload events by setting dom.disable_beforeunload to true in about:config .
Read more >Disable navigating away from web page while an upload is in ...
I like the idea. Since we only want the prompt when a file transfer is in progress, we should somehow activate the beforeunload...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If sites abuse it, you can disable it on a per site basis using uB’s
+js
.One override less. Thanks.
DONE - https://github.com/arkenfox/user.js/pull/1558/commits/070b08aea0c8eb37823381be546672792f831ac8