Bug 392841 - With a download in progress, selection after deletion of a Completed item should go down. p=Edward Lee (Mardak) <edilee@gmail.com> r=sdwilsh

This commit is contained in:
asqueella@gmail.com 2007-09-02 15:21:12 -07:00
Родитель ee3e333ae1
Коммит 434496e9ef
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -225,9 +225,9 @@ function resumeDownload(aDownload)
function removeDownload(aDownload)
{
gDownloadManager.removeDownload(aDownload.getAttribute("dlid"));
var newIndex = Math.max(gDownloadsView.selectedIndex - 1, 0);
let index = gDownloadsView.selectedIndex;
gDownloadsView.removeChild(aDownload);
gDownloadsView.selectedIndex = newIndex;
gDownloadsView.selectedIndex = Math.min(index, gDownloadsView.itemCount - 1);
}
function showDownload(aDownload)