зеркало из https://github.com/mozilla/gecko-dev.git
wall paper fix for bug #348183 nsGlobalWindow:Focus() can return NS_ERROR_FAILURE if we try to focus a disabled element. the unhandled exception in tabbrowser.xml can lead to problems, such as "canceling the 'do you want to close the window with open tabs' prompt still closes the window" r=bryner
This commit is contained in:
Родитель
16f8c799a7
Коммит
b2fbb087e4
|
@ -765,7 +765,12 @@
|
||||||
|
|
||||||
function setFocus(element) {
|
function setFocus(element) {
|
||||||
document.commandDispatcher.suppressFocusScroll = true;
|
document.commandDispatcher.suppressFocusScroll = true;
|
||||||
element.focus();
|
try {
|
||||||
|
element.focus();
|
||||||
|
}
|
||||||
|
catch(ex) {
|
||||||
|
dump("XXX focus() failed, see bug #348183: ex = " + ex + "\n");
|
||||||
|
}
|
||||||
document.commandDispatcher.suppressFocusScroll = false;
|
document.commandDispatcher.suppressFocusScroll = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче