focus the whole window if there is no tabbable content. bug 50881 r=attinasi,bryner,hyatt,saari

This commit is contained in:
danm%netscape.com 2001-05-01 00:30:33 +00:00
Родитель 8b5d6059c9
Коммит 86fe4d027d
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -2175,6 +2175,14 @@ nsDocShell::SetFocus()
nsIFrame *focusFrame = nsnull;
presShell->GetPrimaryFrameFor(focusContent, &focusFrame);
esm->ChangeFocus(focusContent, focusFrame, PR_TRUE);
} else {
nsCOMPtr<nsIScriptGlobalObject> sgo;
document->GetScriptGlobalObject(getter_AddRefs(sgo));
if (sgo) {
nsCOMPtr<nsIDOMWindowInternal> domwin(do_QueryInterface(sgo));
if (domwin)
domwin->Focus();
}
}
return NS_OK;