Bug 1111986 - fix bookmarks toolbar items overflow triggering navbar overflow, r=jaws
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 13 Jan 2015 20:51:43 +0000
changeset 223565 56c85ebbf6d0feb418788d402906d50d00566e55
parent 223564 d0576cfa0b5c75dfb873ee8c5720f5460e31a76e
child 223566 96f157725203bf9da767eff53ac46e0f22196f72
push id10802
push usergijskruitbosch@gmail.com
push dateWed, 14 Jan 2015 00:36:44 +0000
treeherderfx-team@56c85ebbf6d0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1111986
milestone38.0a1
Bug 1111986 - fix bookmarks toolbar items overflow triggering navbar overflow, r=jaws
browser/components/customizableui/CustomizableUI.jsm
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@@ -3964,18 +3964,22 @@ OverflowableToolbar.prototype = {
     this._panel.removeEventListener("dragover", this);
     this._panel.removeEventListener("dragend", this);
     let doc = aEvent.target.ownerDocument;
     let contextMenu = doc.getElementById(this._panel.getAttribute("context"));
     gELS.removeSystemEventListener(contextMenu, 'command', this, true);
   },
 
   onOverflow: function(aEvent) {
+    // The rangeParent check is here because of bug 1111986 and ensuring that
+    // overflow events from the bookmarks toolbar items or similar things that
+    // manage their own overflow don't trigger an overflow on the entire toolbar
     if (!this._enabled ||
-        (aEvent && aEvent.target != this._toolbar.customizationTarget))
+        (aEvent && aEvent.target != this._toolbar.customizationTarget) ||
+        (aEvent && aEvent.rangeParent))
       return;
 
     let child = this._target.lastChild;
 
     while (child && this._target.scrollLeftMax > 0) {
       let prevChild = child.previousSibling;
 
       if (child.getAttribute("overflows") != "false") {