Bug 842356 - Set focus to downloads list box in about:downloads page on page load if list not empty, and made background and focus ring transparent if list empty. r=mak
--- a/browser/components/downloads/content/contentAreaDownloadsView.js
+++ b/browser/components/downloads/content/contentAreaDownloadsView.js
@@ -6,10 +6,12 @@ Components.utils.import("resource://gre/
var ContentAreaDownloadsView = {
init() {
let view = new DownloadsPlacesView(document.getElementById("downloadsRichListBox"));
// Do not display the Places downloads in private windows
if (!PrivateBrowsingUtils.isContentWindowPrivate(window)) {
view.place = "place:transition=7&sort=4";
}
+ // Set focus to Downloads list once it is created
+ document.getElementById("downloadsRichListBox").focus();
},
};
--- a/browser/themes/shared/downloads/contentAreaDownloadsView.css
+++ b/browser/themes/shared/downloads/contentAreaDownloadsView.css
@@ -3,18 +3,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@import url("chrome://global/skin/in-content/common.css");
#contentAreaDownloadsView {
padding: 18px;
}
-#downloadsRichListBox:not(:-moz-focusring) {
+#downloadsRichListBox:empty {
border-color: transparent;
+ background-color: transparent;
}
.downloadButton:not([disabled="true"]):hover,
.downloadButton:not([disabled="true"]):hover:active,
.downloadButton:not([disabled]):hover:active {
background: transparent;
border: none;
}