Make sure to scroll and such _before_ firing events. Bug 264873, r=mats,

sr=bryner
This commit is contained in:
bzbarsky%mit.edu 2005-01-12 02:42:39 +00:00
Родитель b5c3568bed
Коммит 9866f848c5
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -3219,12 +3219,13 @@ nsEventStateManager::ShiftFocusInternal(PRBool aForward, nsIContent* aStart)
}
if (sub_shell) {
SetContentState(nsnull, NS_EVENT_STATE_FOCUS);
// Make sure to scroll before possibly dispatching focus/blur events.
presShell->ScrollFrameIntoView(nextFocusFrame,
NS_PRESSHELL_SCROLL_ANYWHERE,
NS_PRESSHELL_SCROLL_ANYWHERE);
SetContentState(nsnull, NS_EVENT_STATE_FOCUS);
// if we are in the middle of tabbing into
// sub_shell, bail out, to avoid recursion
// see bug #195011 and bug #137191