Add an option to disable onbeforeunload dialogs

VERIFIED FIXED in mozilla29

Status

()

Core
DOM
VERIFIED FIXED
4 years ago
3 years ago

People

(Reporter: spamscud2003, Assigned: Gijs)

Tracking

(Blocks: 1 bug)

Trunk
mozilla29
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0 (Beta/Release)
Build ID: 20131112160018

Steps to reproduce:

Type in any form data, then try to leave the page. A popup message will stop you from leaving the page, and tell you "This page is asking you to confirm that you want to leave - data you have entered may not be saved."


Actual results:

This popup message interupted my focus and prevented me from performing the action I wanted to perform.


Expected results:

There should be a way to permanently disable this "feature". It is an annoyance and and a clear vector for security exploit. In my opinion, this "feature" should be turned off by default, or just removed completely from Firefox.

Updated

4 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 616853
(Reporter)

Comment 2

4 years ago
This issue is not a replica of bug 616853. I don't care if the popup dialog is tab-modal, I'm asking for an option to COMPLETELY REMOVE this "feature". I see the entire "beforeunload" javascript capability as a bug.
(Reporter)

Comment 3

4 years ago
BUMP. NOT RESOLVED. NOT A DUPLICATE.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: DUPLICATE → ---

Comment 4

4 years ago
See bug 578828 for changing the default.
Blocks: 432687
Summary: This page is asking you to confirm that you want to leave - data you have entered may not be saved. → Add an option to disable onbeforeunload dialogs

Comment 5

4 years ago
This doesn't need to stay in Untriaged.  There would be a back-end component to this bug, but the summary "Add an option to disable onbeforeunload dialogs" implies a front-end option available to the user, so I'll move it to Preferences.
Status: REOPENED → NEW
Component: Untriaged → Preferences
(Assignee)

Comment 6

4 years ago
Created attachment 8349406 [details] [diff] [review]
add a pref to disable onbeforeunload,

I think a pref for this is something we should do. Less convinced about UI for this pref as we've removed UI for much more coarse-grained stuff already, so adding a checkbox for this seems like overkill.
Attachment #8349406 - Flags: review?(bzbarsky)
(Assignee)

Updated

4 years ago
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Comment on attachment 8349406 [details] [diff] [review]
add a pref to disable onbeforeunload,

r=me of if you fix the spelling of "onbeforeunload" in the comment and add this pref to all.js so it shows up in about:config.
Attachment #8349406 - Flags: review?(bzbarsky) → review+
(Assignee)

Comment 8

4 years ago
remote:   https://hg.mozilla.org/integration/mozilla-inbound/rev/852a854706d4
OS: Windows 7 → All
Hardware: x86_64 → All
Whiteboard: [fixed-in-inbound]
Version: 25 Branch → Trunk
Component: Preferences → DOM
Product: Firefox → Core
https://hg.mozilla.org/mozilla-central/rev/852a854706d4
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago4 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-inbound]
Target Milestone: --- → mozilla29
(Reporter)

Comment 10

4 years ago
Wow, impressive. Thank you guys.
Duplicate of this bug: 808792

Updated

3 years ago
Keywords: verifyme
I wasn't able to reproduce this issue with the Nightly from 2013-11-12 on Win 8 x86 (although I did see that the "dom.disable_beforeunload" pref wasn't available in this build).
I tried with both https://myaccount.nytimes.com/register?action=click&region=Masthead&pgtype=Homepage&module=Registration&contentCollection=Homepage&t=qry746 and 
https://bug17447.bugzilla.mozilla.org/attachment.cgi?id=2467 to close the tabs containing them, but I didn't get any pop-up message.

Could you please provide some URLs that reproduce this issue?
Flags: needinfo?(gijskruitbosch+bugs)
(Assignee)

Comment 13

3 years ago
(In reply to Manuela Muntean [:Manuela] [QA] from comment #12)
> I wasn't able to reproduce this issue with the Nightly from 2013-11-12 on
> Win 8 x86 (although I did see that the "dom.disable_beforeunload" pref
> wasn't available in this build).
> I tried with both
> https://myaccount.nytimes.com/
> register?action=click&region=Masthead&pgtype=Homepage&module=Registration&con
> tentCollection=Homepage&t=qry746 and 
> https://bug17447.bugzilla.mozilla.org/attachment.cgi?id=2467 to close the
> tabs containing them, but I didn't get any pop-up message.
> 
> Could you please provide some URLs that reproduce this issue?

Try the testcase in bug 636374.
Flags: needinfo?(gijskruitbosch+bugs)
Verified as fixed with latest Aurora and the testcase in bug 636374, on: Win 8 x86, Ubuntu 13.04 x64, Mac 10.8.5.
Status: RESOLVED → VERIFIED
Keywords: verifyme
(Assignee)

Comment 15

3 years ago
Boris, I was discussing this earlier with dolske - the implementation here means no "beforeunload" event fires anymore, which I thought might be broken - ie, we should fire the event but just never show the dialog even when the page says it wants us to (so pretend the user says "yes, I really want to leave" every time).

Would you agree that we should change that? (I'll file a followup bug, but am needinfo'ing here for better context)
Flags: needinfo?(bzbarsky)
Hmm.  Yeah, that might be a better idea.
Flags: needinfo?(bzbarsky)
(Assignee)

Updated

3 years ago
Blocks: 1107771
You need to log in before you can comment on or make changes to this bug.