Bug 314230 - check for XBL focusing hidden tab

p=gijskruitbosch@gmail.com
r=silver@warwickcompsoc.co.uk
chatzilla only
This commit is contained in:
samuel%sieb.net 2005-10-28 23:38:34 +00:00
Родитель 967b26361f
Коммит 556f727f55
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -183,6 +183,14 @@ function onTabClick(e, id)
function onTabSelect(e) function onTabSelect(e)
{ {
var tabs = e.target; var tabs = e.target;
/* Hackaround, bug 314230. XBL likes focusing a tab before onload has fired.
* That means the tab we're trying to select here will be the hidden one,
* which doesn't have a viewKey. We catch that case.
*/
if (!tabs.selectedItem.hasAttribute("viewKey"))
return;
var key = tabs.selectedItem.getAttribute("viewKey"); var key = tabs.selectedItem.getAttribute("viewKey");
var view = client.viewsArray[key]; var view = client.viewsArray[key];
dispatch("set-current-view", {view:view.source}); dispatch("set-current-view", {view:view.source});