Bug 946148 - Australis' context menu items to move toolbaritems/buttons should use popup.triggerNode, r=dao
☠☠ backed out by 48d23dfefc70 ☠ ☠
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Thu, 05 Dec 2013 12:06:43 +0100
changeset 174640 2fd38af5d110e7e88355b3451776932cc343d3a7
parent 174639 ff935cad980479be661e48a544d192df94402600
child 174641 2bd207736d7b96368839c4bbc85cfd024f2b9255
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs946148
milestone28.0a1
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
Bug 946148 - Australis' context menu items to move toolbaritems/buttons should use popup.triggerNode, r=dao
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4189,18 +4189,18 @@ function onViewToolbarsPopupShowing(aEve
 
   let addToPanel = popup.querySelector(".customize-context-addToPanel");
   let removeFromToolbar = popup.querySelector(".customize-context-removeFromToolbar");
   // View -> Toolbars menu doesn't have the addToPanel or removeFromToolbar items.
   if (!addToPanel || !removeFromToolbar) {
     return;
   }
 
-  // The explicitOriginalTarget can be a nested child element of a toolbaritem.
-  let toolbarItem = aEvent.explicitOriginalTarget;
+  // triggerNode can be a nested child element of a toolbaritem.
+  let toolbarItem = popup.triggerNode;
 
   if (toolbarItem && toolbarItem.localName == "toolbarpaletteitem") {
     toolbarItem = toolbarItem.firstChild;
   } else {
     while (toolbarItem && toolbarItem.parentNode) {
       let parent = toolbarItem.parentNode;
       if ((parent.classList && parent.classList.contains("customization-target")) ||
           parent.localName == "toolbarpaletteitem" ||