зеркало из https://github.com/mozilla/gecko-dev.git
Bug 314230 - check for XBL focusing hidden tab
p=gijskruitbosch@gmail.com r=silver@warwickcompsoc.co.uk chatzilla only
This commit is contained in:
Родитель
967b26361f
Коммит
556f727f55
|
@ -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});
|
||||||
|
|
Загрузка…
Ссылка в новой задаче