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:
mrbkap%gmail.com 2005-11-07 20:21:44 +00:00
Родитель e748b37142
Коммит be3ea49847
2 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -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();