Bug 1457389 - Check if extension is in the overflow menu when setting fixedWidth on the popup. r?Gijs draft
authorSam Foster <sfoster@mozilla.com>
Mon, 30 Apr 2018 09:56:27 -0700
changeset 797328 fe449ad28e7dfeb3bde9885bb0934ca73a5f53b9
parent 796870 11ee70f24ea52c4dc4f113593c288f4a6dc92c55
push id110464
push userbmo:sfoster@mozilla.com
push dateFri, 18 May 2018 22:17:35 +0000
reviewersGijs
bugs1457389
milestone62.0a1
Bug 1457389 - Check if extension is in the overflow menu when setting fixedWidth on the popup. r?Gijs MozReview-Commit-ID: 3NqnOMpu18M
browser/components/extensions/parent/ext-browserAction.js
--- a/browser/components/extensions/parent/ext-browserAction.js
+++ b/browser/components/extensions/parent/ext-browserAction.js
@@ -391,17 +391,19 @@ this.browserAction = class extends Exten
           pendingPopup.unblockParser();
         }
 
         return pendingPopup;
       }
       pendingPopup.destroy();
     }
 
-    let fixedWidth = this.widget.areaType == CustomizableUI.TYPE_MENU_PANEL;
+    let fixedWidth =
+      this.widget.areaType == CustomizableUI.TYPE_MENU_PANEL ||
+      this.widget.forWindow(window).overflowed;
     return new ViewPopup(this.extension, window, popupURL, this.browserStyle, fixedWidth, blockParser);
   }
 
   /**
    * Clears any pending pre-loaded popup and related timeouts.
    */
   clearPopup() {
     this.clearPopupTimeout();