Closed Bug 664586 Opened 13 years ago Closed 12 years ago

alert on unload parents modal dialog to different tab

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: Gavin, Unassigned)

References

Details

(Keywords: sec-moderate, Whiteboard: [sg:moderate spoof])

STR:
1) Open multiple tabs. Load data:text/html,<body onunload="alert('test')"> in one.
2) Close that tab.

Result: alert parented to newly selected (completely unrelated) tab
Expected: no alert

Marking sec-sensitive since there is some spoofing risk here...
I think perhaps the "if we can't do a tab-modal prompt" fallback in ModalPrompter.openPrompt needs to to catch this case?

Or maybe we just need to remove the XXX fallback to activeWindow in openModalWindow...
Chrome has also been investigating disallowing prompts from unload/beforeunload/etc - discussing of that on #whatwg is what prompted discovery of this.
Dolske, I think this is a regression from the modal dialog work you did, can you please have a look?
Assignee: nobody → dolske
Whiteboard: [sg:moderate spoof]
Depends on: 391834
Justin - any chance you can look at this soon or recommend another owner?
This was fixed by bug 391834.
Assignee: dolske → nobody
Group: core-security
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.