Scroll the find position last so that it is not overriden by another intermediate scrolling, b=242056, r=akkana, sr=jst

This commit is contained in:
rbs%maths.uq.edu.au 2004-05-01 07:47:23 +00:00
Родитель 152aab0aac
Коммит 487cf2d38c
1 изменённых файлов: 6 добавлений и 4 удалений

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

@ -452,10 +452,6 @@ void nsWebBrowserFind::SetSelectionAndScroll(nsIDOMWindow* aWindow,
if (selection) { if (selection) {
selection->RemoveAllRanges(); selection->RemoveAllRanges();
selection->AddRange(aRange); selection->AddRange(aRange);
// Scroll if necessary to make the selection visible:
selCon->ScrollSelectionIntoView
(nsISelectionController::SELECTION_NORMAL,
nsISelectionController::SELECTION_FOCUS_REGION, PR_TRUE);
if (tcFrame) { if (tcFrame) {
FocusElementButNotDocument(doc, content); FocusElementButNotDocument(doc, content);
@ -467,6 +463,12 @@ void nsWebBrowserFind::SetSelectionAndScroll(nsIDOMWindow* aWindow,
presContext->EventStateManager()-> presContext->EventStateManager()->
MoveFocusToCaret(PR_TRUE, &isSelectionWithFocus); MoveFocusToCaret(PR_TRUE, &isSelectionWithFocus);
} }
// Scroll if necessary to make the selection visible:
// Must be the last thing to do - bug 242056
selCon->ScrollSelectionIntoView
(nsISelectionController::SELECTION_NORMAL,
nsISelectionController::SELECTION_FOCUS_REGION, PR_TRUE);
} }
} }