followup for bug 595937 (r=enndeakin a=blocking-beta6+)
authormano@mozilla.com
Tue, 14 Sep 2010 20:19:09 +0700
changeset 53787 e523182f96397d06acedc258644c9c9ce891a428
parent 53786 1c6eda75b12991cf86bb1315416eb32b9864a6ad
child 53791 08937a34017451328534b7775c23c175cfde8ec3
push id15697
push userdietrich@mozilla.com
push dateTue, 14 Sep 2010 13:19:42 +0000
treeherdermozilla-central@e523182f9639 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersenndeakin, blocking-beta6
bugs595937
milestone2.0b7pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
followup for bug 595937 (r=enndeakin a=blocking-beta6+)
toolkit/content/customizeToolbar.js
--- a/toolkit/content/customizeToolbar.js
+++ b/toolkit/content/customizeToolbar.js
@@ -138,20 +138,20 @@ function repositionDialog(aWindow)
 
   aWindow.moveTo(screenX, screenY);
 }
 
 function removeToolboxListeners()
 {
   var elts = getRootElements();
   for (let i=0; i < elts.length; i++) {
-    elts[i].addEventListener("dragstart", onToolbarDragStart, true);
-    elts[i].addEventListener("dragover", onToolbarDragOver, true);
-    elts[i].addEventListener("dragleave", onToolbarDragLeave, true);
-    elts[i].addEventListener("drop", onToolbarDrop, true);
+    elts[i].removeEventListener("dragstart", onToolbarDragStart, true);
+    elts[i].removeEventListener("dragover", onToolbarDragOver, true);
+    elts[i].removeEventListener("dragleave", onToolbarDragLeave, true);
+    elts[i].removeEventListener("drop", onToolbarDrop, true);
   }
 }
 
 /**
  * Invoke a callback on the toolbox to notify it that the dialog is done
  * and going away.
  */
 function notifyParentComplete()
@@ -243,16 +243,17 @@ function getRootElements()
 /**
  * Unwraps all items in all customizable toolbars in a toolbox.
  */
 function unwrapToolbarItems()
 {
   let elts = getRootElements();
   for (let i=0; i < elts.length; i++) {
     let paletteItems = elts[i].getElementsByTagName("toolbarpaletteitem");
+    let paletteItem;
     while ((paletteItem = paletteItems.item(0)) != null) {
       let toolbarItem = paletteItem.firstChild;
       restoreItemForToolbar(toolbarItem, paletteItem);
       paletteItem.parentNode.replaceChild(toolbarItem, paletteItem);
     }
   }
 }