Bug 363271, remove download manager hack from richlistbox, Patch by Simon Bünzli, r=enn

git-svn-id: svn://10.0.0.236/trunk@228138 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
flamingice%sourmilk.net
2007-06-15 21:19:09 +00:00
parent 56c1677021
commit 2d922a976f
2 changed files with 7 additions and 7 deletions

View File

@@ -384,11 +384,6 @@
if (this.selType != "multiple" && this.selectedCount == 0)
this.selectedItem = this.currentItem;
// XXX hack for the Downloads manager (better to focus the list than
// the individual items - these usually aren't tabbable anyway, and
// we need the keyboard focus for navigation), see bug 363271:
this.focus();
]]>
</body>
</method>

View File

@@ -173,9 +173,13 @@ function autoRemoveAndClose(aDownload)
var autoClose = pref.getBoolPref(PREF_BDM_CLOSEWHENDONE);
if (autoClose && (!window.opener ||
window.opener.location.href == window.location.href) &&
gCanAutoClose && !gUserInteracted)
gCanAutoClose && !gUserInteracted) {
gCloseDownloadManager();
return true;
}
}
return false;
}
// This function can be overwritten by extensions that wish to place the Download Window in
@@ -571,7 +575,8 @@ function Startup()
gDownloadsView.controllers.appendController(gDownloadViewController);
// downloads can finish before Startup() does, so check if the window should close
autoRemoveAndClose();
if (!autoRemoveAndClose())
gDownloadsView.focus();
}
function Shutdown()