Bug 211852 and bug 212626. Tab and shift+tab not working with sub documents. r=bryner, sr=bz

This commit is contained in:
aaronl%netscape.com 2003-07-24 08:53:48 +00:00
Родитель df20768272
Коммит 718fd8dd01
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -5005,15 +5005,15 @@ NS_IMETHODIMP nsEventStateManager::MoveCaretToFocus()
nsCOMPtr<nsIFrameSelection> frameSelection;
shell->GetFrameSelection(getter_AddRefs(frameSelection));
if (currentFocusNode && frameSelection && rangeDoc) {
if (frameSelection && rangeDoc) {
nsCOMPtr<nsISelection> domSelection;
frameSelection->GetSelection(nsISelectionController::SELECTION_NORMAL,
getter_AddRefs(domSelection));
if (domSelection) {
// First clear the selection
domSelection->RemoveAllRanges();
nsCOMPtr<nsIDOMRange> newRange;
if (currentFocusNode) {
nsCOMPtr<nsIDOMRange> newRange;
nsresult rv = rangeDoc->CreateRange(getter_AddRefs(newRange));
if (NS_SUCCEEDED(rv)) {
// Set the range to the start of the currently focused node