зеркало из https://github.com/mozilla/pjs.git
Bug 363271, remove download manager hack from richlistbox, Patch by Simon Bünzli, r=enn
This commit is contained in:
Родитель
b9cd67085f
Коммит
e8dc82b219
|
@ -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>
|
||||
|
|
|
@ -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()
|
||||
|
|
Загрузка…
Ссылка в новой задаче