Need to handle DOMWillOpenModalDialog

RESOLVED FIXED in fennec1.0b4

Status

RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Gavin, Assigned: stechz)

Tracking

Trunk
fennec1.0b4

Details

Attachments

(1 attachment, 1 obsolete attachment)

Otherwise background tabs can open alerts over the selected tab.
tracking-fennec: --- → ?
Assignee: nobody → gavin.sharp
(Assignee)

Updated

9 years ago
Assignee: gavin.sharp → webapps
(bug 277574 is the original core/firefox bug)

Updated

9 years ago
tracking-fennec: ? → 1.0+
(Assignee)

Comment 3

9 years ago
Created attachment 401975 [details] [diff] [review]
Implement by adding event listener in _createBrowser
Attachment #401975 - Flags: review?(gavin.sharp)
Comment on attachment 401975 [details] [diff] [review]
Implement by adding event listener in _createBrowser

Can you add the listener here:
http://mxr.mozilla.org/mobile-browser/source/chrome/content/browser-ui.js#389

Add the handler as a member of BrowserUI.

Drop the | let targetTop = new XPCNativeWrapper(e.target, "top").top; | and use | let targetTop = event.target.top; | that the newest tabbrowser.xml code uses:
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml#2784
Attachment #401975 - Flags: review?(gavin.sharp) → review-
Oh, here is a piece of bad news: "DOMWillOpenModalDialog" and "DOMModalDialogClosed" are fired by nsAutoWindowStateHelper found here:
http://mxr.mozilla.org/mozilla-central/source/embedding/components/windowwatcher/src/nsAutoWindowStateHelper.cpp#52

Which is heavily used in nsPromptService:
http://mxr.mozilla.org/mozilla-central/ident?i=nsAutoWindowStateHelper

Of course, Fennec overrides the nsPromptService and doesn't currently fire the event :(
Let's get this patch ready for listening and handling the event. We can open another bug for firing the event.

Filed bug 518054
(Assignee)

Comment 7

9 years ago
Created attachment 403494 [details] [diff] [review]
Listen for event in correct place

Cool, I did not know addEventListener will call handleEvent on an object.
Attachment #401975 - Attachment is obsolete: true
Attachment #403494 - Flags: review?(mark.finkle)
(Assignee)

Updated

9 years ago
Status: NEW → ASSIGNED
Attachment #403494 - Flags: review?(mark.finkle) → review+
pushed:
https://hg.mozilla.org/mobile-browser/rev/a5c85d5f25a2

This still needs bug 518054 to work completely.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → B4
You need to log in before you can comment on or make changes to this bug.