зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
152aab0aac
Коммит
487cf2d38c
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче