зеркало из https://github.com/mozilla/gecko-dev.git
bug 315434: Remote XUL tabboxes can get stuck on a tab if the focus leaves the content window (e.g., one of the browser tabs is selected). r=mconnor
This commit is contained in:
Родитель
e748b37142
Коммит
be3ea49847
|
@ -344,8 +344,11 @@
|
|||
this.childNodes[0];
|
||||
}
|
||||
|
||||
var isTabFocused =
|
||||
(document.commandDispatcher.focusedElement == this.selectedItem);
|
||||
try {
|
||||
var isTabFocused = document.commandDispatcher.focusedElement == this.selectedItem;
|
||||
} catch (e) {
|
||||
isTabFocused = false;
|
||||
}
|
||||
this.selectedItem = aNewTab;
|
||||
if (isTabFocused) {
|
||||
aNewTab.focus();
|
||||
|
|
|
@ -295,8 +295,12 @@
|
|||
<parameter name="aNewTab"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var isTabFocused =
|
||||
(document.commandDispatcher.focusedElement == this.selectedItem);
|
||||
try {
|
||||
var isTabFocused =
|
||||
(document.commandDispatcher.focusedElement == this.selectedItem);
|
||||
} catch (e) {
|
||||
isTabFocused = false;
|
||||
}
|
||||
this.selectedItem = aNewTab;
|
||||
if (isTabFocused) {
|
||||
aNewTab.focus();
|
||||
|
|
Загрузка…
Ссылка в новой задаче