Closed Bug 515213 Opened 10 years ago Closed 10 years ago

Need to handle DOMWillOpenModalDialog

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set

Tracking

(fennec1.0+)

RESOLVED FIXED
fennec1.0b4
Tracking Status
fennec 1.0+ ---

People

(Reporter: Gavin, Assigned: stechz)

References

Details

Attachments

(1 file, 1 obsolete file)

Otherwise background tabs can open alerts over the selected tab.
tracking-fennec: --- → ?
Assignee: nobody → gavin.sharp
Assignee: gavin.sharp → webapps
(bug 277574 is the original core/firefox bug)
tracking-fennec: ? → 1.0+
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
Cool, I did not know addEventListener will call handleEvent on an object.
Attachment #401975 - Attachment is obsolete: true
Attachment #403494 - Flags: review?(mark.finkle)
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
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → B4
You need to log in before you can comment on or make changes to this bug.