Bug 1318583: Part 3 - Set minWidth and minHeight on non-fixed-width panel browsers. r=aswan
authorKris Maglione <maglione.k@gmail.com>
Sat, 26 Nov 2016 17:17:16 -0800
changeset 324774 2bd028b1ed5f8ce717bb620a0ca7a1e4f6be6670
parent 324773 8db368bd5ecbc1159e4a4675f5c368f56a090df3
child 324775 c258d5040f12098bfcc9c69a5215e14ffdcd79d6
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersaswan
bugs1318583
milestone53.0a1
Bug 1318583: Part 3 - Set minWidth and minHeight on non-fixed-width panel browsers. r=aswan MozReview-Commit-ID: FvqsaubkFUy
browser/components/extensions/ext-utils.js
--- a/browser/components/extensions/ext-utils.js
+++ b/browser/components/extensions/ext-utils.js
@@ -315,17 +315,19 @@ class BasePopup {
       // maximum height, so that the PanelUI resizing code can make an accurate
       // calculation. If we don't do this, the flex sizing logic will prevent us
       // from ever reporting a preferred size smaller than the height currently
       // available to us in the panel.
       height = Math.max(height, this.viewHeight);
       this.viewNode.style.maxHeight = `${height}px`;
     } else {
       this.browser.style.width = `${width}px`;
+      this.browser.style.minWidth = `${width}px`;
       this.browser.style.height = `${height}px`;
+      this.browser.style.minHeight = `${height}px`;
     }
 
     let event = new this.window.CustomEvent("WebExtPopupResized", {detail});
     this.browser.dispatchEvent(event);
   }
 
   setBackground(background) {
     let panelBackground = "";