Bug 1318583: Part 3 - Set minWidth and minHeight on non-fixed-width panel browsers. r?aswan draft
authorKris Maglione <maglione.k@gmail.com>
Sat, 26 Nov 2016 17:17:16 -0800
changeset 445578 e7fe082c4349cd750506b25730433d7e21653561
parent 445577 d104fbc6aef4a0b15c2bd155e0d649656407e633
child 445579 e087eb3ed39201070fa38a1ca5821370c48a8980
push id37567
push usermaglione.k@gmail.com
push dateWed, 30 Nov 2016 01:09:16 +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 = "";