Bug 758747 - Compose window is broken with Personas. r=mconley
authorMark Banner <bugzilla@standard8.plus.com>
Tue, 19 Jun 2012 16:10:09 +0100
changeset 10465 09ee92ece7f2ebc55658c2eb38a5781d8adccdb1
parent 10464 c24070161c87dcc47695564ea106ee409a138013
child 10466 67d6bb332321e2b8ccb23e2fc5c3464c9c4beb6f
push id7915
push userbugzilla@standard8.plus.com
push dateTue, 19 Jun 2012 15:15:14 +0000
treeherdercomm-central@67d6bb332321 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs758747
Bug 758747 - Compose window is broken with Personas. r=mconley
mail/components/compose/content/bigFileObserver.js
mail/components/compose/content/cloudAttachmentLinkManager.js
--- a/mail/components/compose/content/bigFileObserver.js
+++ b/mail/components/compose/content/bigFileObserver.js
@@ -281,12 +281,12 @@ var gBigFileObserver = {
       if (item && item.uploading)
         return true;
     }
     return false;
   },
 
 };
 
-document.documentElement.addEventListener("compose-window-init",
-  gBigFileObserver.init.bind(gBigFileObserver), false);
-document.documentElement.addEventListener("compose-window-close",
-  gBigFileObserver.uninit.bind(gBigFileObserver), false);
+window.addEventListener("compose-window-init",
+  gBigFileObserver.init.bind(gBigFileObserver), true);
+window.addEventListener("compose-window-close",
+  gBigFileObserver.uninit.bind(gBigFileObserver), true);
--- a/mail/components/compose/content/cloudAttachmentLinkManager.js
+++ b/mail/components/compose/content/cloudAttachmentLinkManager.js
@@ -497,14 +497,14 @@ var gCloudAttachmentLinkManager = {
         let element = mailDoc.getElementById(id);
         if (element)
           element.removeAttribute("id");
       }
     }
   },
 };
 
-document.documentElement.addEventListener("compose-window-init",
-  gCloudAttachmentLinkManager.init.bind(gCloudAttachmentLinkManager), false);
-document.documentElement.addEventListener("compose-window-close",
-  gCloudAttachmentLinkManager.uninit.bind(gCloudAttachmentLinkManager), false);
-document.documentElement.addEventListener("compose-send-message",
-  gCloudAttachmentLinkManager.send.bind(gCloudAttachmentLinkManager), false);
+window.addEventListener("compose-window-init",
+  gCloudAttachmentLinkManager.init.bind(gCloudAttachmentLinkManager), true);
+window.addEventListener("compose-window-close",
+  gCloudAttachmentLinkManager.uninit.bind(gCloudAttachmentLinkManager), true);
+window.addEventListener("compose-send-message",
+  gCloudAttachmentLinkManager.send.bind(gCloudAttachmentLinkManager), true);