Bug 526921: add-ons get installed before user confirmation [r=mark.finkle]
authorFabrice Desré <fabrice.desre@gmail.com>
Fri, 20 Nov 2009 12:35:01 -0500
changeset 65826 4db2f5476f015fe36a67b16e005139f2a8cca542
parent 65825 23284f162cb84098f58fc92930b6277e794395db
child 65827 827cbf735d377534ed8d64186c72278eb94b7ada
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmark
bugs526921
Bug 526921: add-ons get installed before user confirmation [r=mark.finkle]
mobile/chrome/content/bindings/dialog.xml
--- a/mobile/chrome/content/bindings/dialog.xml
+++ b/mobile/chrome/content/bindings/dialog.xml
@@ -36,18 +36,20 @@
         }
         window.addEventListener("unload", this, true);
         ]]>
       </constructor>
 
       <method name="handleEvent">
         <parameter name="aEvent"/>
         <body>
-          if (aEvent.type == "unload")
+        <![CDATA[
+          if (aEvent.originalTarget == document && aEvent.type == "unload")
             this._closed = true;
+            ]]>
         </body>
       </method>
       
       <method name="close">
         <body>
           if (this.hasAttribute("onclose")) {
             var f = new Function(this.getAttribute("onclose"));
             f.call(this);