Bug 77913 - tab focus not cycling around in dialogs. r=jag, sr=jst, a=blizzard.

git-svn-id: svn://10.0.0.236/trunk@97409 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%uiuc.edu
2001-06-19 05:35:24 +00:00
parent ac20d310d0
commit 2bdddc306e

View File

@@ -2869,10 +2869,17 @@ nsDocShell::FocusAvailable(nsIBaseWindow * aCurrentFocus,
else
ret = chromeFocus->FocusPrevElement();
// For DocShell's not implemented by this class
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(chromeFocus));
MakeSureOfSetFocus(nsnull, docShell);
return ret;
if (NS_SUCCEEDED(ret)) {
// For DocShell's not implemented by this class
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(chromeFocus));
MakeSureOfSetFocus(nsnull, docShell);
return ret;
} else {
// If the embeddor does not implement FocusNext/PrevElement,
// or some other error occurred, just focus ourselves again.
SetFocus();
return NS_OK;
}
}
#ifdef DEBUG_DOCSHELL_FOCUS
@@ -2907,7 +2914,8 @@ nsDocShell::FocusAvailable(nsIBaseWindow * aCurrentFocus,
if (!mChildren.Count()) {
//If we don't have children and our parent didn't want
//the focus then we should just stop now.
//the focus then we should just take focus again.
SetFocus();
return NS_OK;
}
}