зеркало из https://github.com/mozilla/gecko-dev.git
focus the whole window if there is no tabbable content. bug 50881 r=attinasi,bryner,hyatt,saari
This commit is contained in:
Родитель
8b5d6059c9
Коммит
86fe4d027d
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче