Open
Bug 1131187
Opened 10 years ago
Updated 2 years ago
Disable onbeforeunload dialog for frames
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Core
DOM: Core & HTML
Tracking
()
REOPENED
People
(Reporter: jruderman, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-needed, site-compat)
Attachments
(2 files, 4 obsolete files)
(Split from bug 1125285)
Updated•7 years ago
|
Keywords: dev-doc-needed,
site-compat
Comment 1•7 years ago
|
||
Test page for this bug.
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
I couldn't find a way to reproduce this bug on Nightly 60.
It looks like we may not allow any of (alert,confirm,prompt) from a beforeunload event either in a frame or on a top-level page.
Comment 4•7 years ago
|
||
Jesse, can you provide more info on what this bug is about or provide a testcase?
Flags: needinfo?(jruderman)
Comment 5•7 years ago
|
||
Working test case using the "blur" event like in bug 1125285.
Attachment #8946955 -
Attachment is obsolete: true
Flags: needinfo?(jruderman)
Comment 6•7 years ago
|
||
Attachment #8946956 -
Attachment is obsolete: true
Comment 7•7 years ago
|
||
While there is an infinite series of dialogs, the "Prevent this page from creating additional dialogs" checkbox and allows users to end the dialogs and close the tab.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Comment 8•7 years ago
|
||
I don't think this is WFM, the testcases don't test what this bug is about.
The problem here is basically:
1. parent page
2. loads iframe page, which registers a beforeunload handler which returns a string / calls preventdefault on the event
3. parent page navigates child page, which triggers the beforeunload handler, which creates a beforeunload prompt.
The contention of this bug is that we shouldn't show beforeunload dialogs for frames at all.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Comment 9•7 years ago
|
||
Thanks for this Gijs. I was finally able to create a test case for this bug.
Attachment #8948856 -
Attachment is obsolete: true
Comment 10•7 years ago
|
||
Attachment #8948857 -
Attachment is obsolete: true
Comment 11•7 years ago
|
||
As noted in bug 1125285, this now only fires if you interact with the page (e.g. by clicking the button). It's no longer possible for the document to spam you via a subframe without clicks/keypresses , because of bug 636905 (though see bug 1345830).
We have bug 578828 to disable beforeunload dialogs entirely. I'm not convinced either that or this bug would be web-compatible.
One other thing we could do is making beforeunload prompts subject to the 'prevent this page from opening more dialogs' permission (and include a checkbox for it by default in beforeunload dialogs). However, that won't work cross-site when the tab navigates frames, so will probably only offer limited help to people affected by this. That said, the interaction flag will get reset when the page navigates, so then hopefully that will help prevent dialogs on new domains.
Updated•6 years ago
|
Priority: -- → P3
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•