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
Родитель 73ef4c424b
Коммит 79651b4209
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -183,6 +183,14 @@ function onTabClick(e, id)
function onTabSelect(e)
{
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 view = client.viewsArray[key];
dispatch("set-current-view", {view:view.source});