Bug 1292345 - Downloads panel didn't shrink to the fit height after all items are downloaded. r=me
authorDrew Willcoxon <adw@mozilla.com>
Fri, 26 Aug 2016 16:36:56 -0700
changeset 407062 7af509f4eb3bdc660386a216d60a97a0f166d168
parent 407061 cf46024ec64e70da5e334450fe36214f2400eb25
child 407063 7293879d87d780790cb0f67e98226b7d4de6d4e1
push id27893
push userbmo:gasolin@mozilla.com
push dateTue, 30 Aug 2016 03:41:38 +0000
reviewersme
bugs1292345
milestone51.0a1
Bug 1292345 - Downloads panel didn't shrink to the fit height after all items are downloaded. r=me MozReview-Commit-ID: AV0S8GM0ztj
browser/components/downloads/content/downloads.js
--- a/browser/components/downloads/content/downloads.js
+++ b/browser/components/downloads/content/downloads.js
@@ -1520,16 +1520,20 @@ const DownloadsFooter = {
    */
   set showingSummary(aValue) {
     if (this._footerNode) {
       if (aValue) {
         this._footerNode.setAttribute("showingsummary", "true");
       } else {
         this._footerNode.removeAttribute("showingsummary");
       }
+      if (!aValue && this._showingSummary) {
+        // Make sure the panel's height shrinks when the summary is hidden.
+        DownloadsBlockedSubview.view.setHeightToFit();
+      }
       this._showingSummary = aValue;
     }
     return aValue;
   },
 
   /**
    * Element corresponding to the footer of the downloads panel.
    */