Bug 611553 - Android: Make DOMWillOpenModalDialog a chrome-only event. r=mbrubeck a=akeybl
--- a/mobile/android/components/PromptService.js
+++ b/mobile/android/components/PromptService.js
@@ -756,17 +756,19 @@ let PromptUtils = {
fireDialogEvent: function(aDomWin, aEventName) {
// accessing the document object can throw if this window no longer exists. See bug 789888.
try {
if (!aDomWin.document)
return;
let event = aDomWin.document.createEvent("Events");
event.initEvent(aEventName, true, true);
- aDomWin.dispatchEvent(event);
+ let winUtils = aDomWin.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIDOMWindowUtils);
+ winUtils.dispatchEventToChromeOnly(aDomWin, event);
} catch(ex) {
}
}
};
XPCOMUtils.defineLazyGetter(PromptUtils, "passwdBundle", function () {
return Services.strings.createBundle("chrome://passwordmgr/locale/passwordmgr.properties");
});