Bug 1280799 - Update the state of the 'Clear Downloads' button when download item state changes, even if the item is selected. r?paolo
MozReview-Commit-ID: 2YXLDuBxkTe
--- a/browser/components/downloads/content/allDownloadsViewOverlay.js
+++ b/browser/components/downloads/content/allDownloadsViewOverlay.js
@@ -297,19 +297,18 @@ HistoryDownloadElementShell.prototype =
return status;
},
onStateChanged() {
this._updateState();
if (this.element.selected) {
goUpdateDownloadCommands();
- } else {
- goUpdateCommand("downloadsCmd_clearDownloads");
}
+ goUpdateCommand("downloadsCmd_clearDownloads");
},
onChanged() {
// This cannot be placed within onStateChanged because
// when a download goes from hasBlockedData to !hasBlockedData
// it will still remain in the same state.
this.element.classList.toggle("temporary-block",
!!this.download.hasBlockedData);