зеркало из https://github.com/mozilla/pjs.git
deactivate root focus controller as well as your own while deactivating yourself. bug 122462 / bugscape 11864 code=saari,myself r=bryner,hyatt
This commit is contained in:
Родитель
306aedf985
Коммит
aef095fb3d
|
@ -1677,9 +1677,14 @@ NS_IMETHODIMP nsWebBrowser::Deactivate(void)
|
|||
GetContentDOMWindow(getter_AddRefs(domWindow));
|
||||
if (domWindow) {
|
||||
nsCOMPtr<nsPIDOMWindow> privateDOMWindow = do_QueryInterface(domWindow);
|
||||
if(privateDOMWindow)
|
||||
if(privateDOMWindow) {
|
||||
nsCOMPtr<nsIFocusController> focusController;
|
||||
privateDOMWindow->GetRootFocusController(getter_AddRefs(focusController));
|
||||
if (focusController)
|
||||
focusController->SetActive(PR_FALSE);
|
||||
privateDOMWindow->Deactivate();
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -542,9 +542,14 @@ nsWebShellWindow::HandleEvent(nsGUIEvent *aEvent)
|
|||
else */
|
||||
if (domWindow) {
|
||||
nsCOMPtr<nsPIDOMWindow> privateDOMWindow = do_QueryInterface(domWindow);
|
||||
if(privateDOMWindow)
|
||||
if(privateDOMWindow) {
|
||||
nsCOMPtr<nsIFocusController> focusController;
|
||||
privateDOMWindow->GetRootFocusController(getter_AddRefs(focusController));
|
||||
if (focusController)
|
||||
focusController->SetActive(PR_FALSE);
|
||||
privateDOMWindow->Deactivate();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче