зеркало из https://github.com/mozilla/gecko-dev.git
Fix (again) setting of focused window/element on focus controller. This ensures that we do the right thing when given either an element or a window to focus. Bug 89214, r=neil, sr=jag.
This commit is contained in:
Родитель
8f59c1542e
Коммит
5b55589ce4
|
@ -675,11 +675,15 @@ function WindowFocusTimerCallback(element)
|
|||
// set the element in command dispatcher so focus will restore properly
|
||||
// when the window does become active
|
||||
|
||||
document.commandDispatcher.focusedWindow = window;
|
||||
if (element instanceof Components.interfaces.nsIDOMElement)
|
||||
if (element instanceof Components.interfaces.nsIDOMWindow) {
|
||||
document.commandDispatcher.focusedWindow = element;
|
||||
document.commandDispatcher.focusedElement = null;
|
||||
} else if (element instanceof Components.interfaces.nsIDOMElement) {
|
||||
document.commandDispatcher.focusedWindow = element.ownerDocument.defaultView;
|
||||
document.commandDispatcher.focusedElement = element;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function BrowserFlushBookmarksAndHistory()
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче