Bug #297365 --> creating a 5th search term in a saved search dialog scrolls to bottom of list instead of to the row

which was added.

sr=bienvenu
a=asa
This commit is contained in:
scott%scott-macgregor.org 2005-06-14 23:20:29 +00:00
Родитель 697fbf6ac1
Коммит d7d9c4d21b
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -205,7 +205,7 @@ function initializeSearchRows(scope, searchTerms)
function scrollToLastSearchTerm(index)
{
if (index > 0)
gSearchTermList.ensureIndexIsVisible(index-1);
gSearchTermList.ensureIndexIsVisible(index);
}
function onMore(event, rowNumber)
@ -218,7 +218,7 @@ function onMore(event, rowNumber)
document.getElementById("less0").removeAttribute("disabled");
// the user just added a term, so scroll to it
scrollToLastSearchTerm(gTotalSearchTerms);
scrollToLastSearchTerm(gTotalSearchTerms == 1 ? 0 : rowNumber + 1);
}
function onLess(event, rowNumber)