зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
697fbf6ac1
Коммит
d7d9c4d21b
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче