mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
focus the whole window if there is no tabbable content. bug 50881 r=attinasi,bryner,hyatt,saari
This commit is contained in:
parent
8b5d6059c9
commit
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user