Bug 1447956 - Use this.tabbrowser.tabContainer instead of this.tabbrowser.tabbox.tabs. r=dao

This commit is contained in:
Kiran 2018-03-25 19:49:00 +02:00
Родитель 2a15760bcd
Коммит 78451d10e0
1 изменённых файлов: 4 добавлений и 5 удалений

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

@ -416,13 +416,12 @@ class AsyncTabSwitcher {
this.maybeVisibleTabs.add(showTab); this.maybeVisibleTabs.add(showTab);
let tabs = this.tabbrowser.tabbox.tabs; let tabpanels = this.tabbrowser.tabpanels;
let tabPanel = this.tabbrowser.tabpanels; let showPanel = this.tabbrowser.tabContainer.getRelatedElement(showTab);
let showPanel = tabs.getRelatedElement(showTab); let index = Array.indexOf(tabpanels.childNodes, showPanel);
let index = Array.indexOf(tabPanel.childNodes, showPanel);
if (index != -1) { if (index != -1) {
this.log(`Switch to tab ${index} - ${this.tinfo(showTab)}`); this.log(`Switch to tab ${index} - ${this.tinfo(showTab)}`);
tabPanel.setAttribute("selectedIndex", index); tabpanels.setAttribute("selectedIndex", index);
if (showTab === this.requestedTab) { if (showTab === this.requestedTab) {
if (this._requestingTab) { if (this._requestingTab) {
/* /*