MoveFocusToCaret() could cause the selection frame to be destroyed, so ask for it again. b=308086 r=aaronleventhal sr=bryner

This commit is contained in:
mats.palmgren%bredband.net 2006-01-07 04:08:05 +00:00
Родитель b837c9d737
Коммит bbaa13ef0a
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -3231,6 +3231,11 @@ nsEventStateManager::ShiftFocusInternal(PRBool aForward, nsIContent* aStart)
PRBool selectionWithFocus; PRBool selectionWithFocus;
MoveFocusToCaret(PR_FALSE, &selectionWithFocus); MoveFocusToCaret(PR_FALSE, &selectionWithFocus);
ignoreTabIndex = !selectionWithFocus; ignoreTabIndex = !selectionWithFocus;
// Refresh |selectionFrame| since MoveFocusToCaret() could have
// destroyed it. (bug 308086)
GetDocSelectionLocation(getter_AddRefs(selectionContent),
getter_AddRefs(endSelectionContent),
&selectionFrame, &selectionOffset);
} }
} }
} }