Merge pull request #606 from Infocatcher/fix_pinned_tabs
Correctly update "list all tabs" menu if there is pinned tabs
This commit is contained in:
commit
334dd585b5
@ -444,28 +444,10 @@ TreeStyleTabWindow.prototype = {
|
|||||||
if (!utils.getTreePref('enableSubtreeIndent.allTabsPopup'))
|
if (!utils.getTreePref('enableSubtreeIndent.allTabsPopup'))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var items = Array.slice(aEvent.originalTarget.childNodes);
|
Array.forEach(aEvent.originalTarget.childNodes, function(aItem) {
|
||||||
var firstItemIndex = 0;
|
if (aItem.classList.contains('alltabs-item') && 'tab' in aItem)
|
||||||
// ignore menu items inserted by Weave (Firefox Sync), Tab Utilities, and others.
|
aItem.style.marginLeft = aItem.tab.getAttribute(this.kNEST) + 'em';
|
||||||
for (let i = 0, maxi = items.length; i < maxi; i++)
|
}, this);
|
||||||
{
|
|
||||||
let item = items[i];
|
|
||||||
if (
|
|
||||||
item.getAttribute('anonid') ||
|
|
||||||
item.id ||
|
|
||||||
item.hidden ||
|
|
||||||
item.localName != 'menuitem'
|
|
||||||
)
|
|
||||||
firstItemIndex = i + 1;
|
|
||||||
}
|
|
||||||
items = items.slice(firstItemIndex);
|
|
||||||
|
|
||||||
var b = this.getTabBrowserFromChild(aEvent.originalTarget) || this.browser;
|
|
||||||
var tabs = this.getTabs(b);
|
|
||||||
for (let i = 0, maxi = tabs.length; i < maxi; i++)
|
|
||||||
{
|
|
||||||
items[i].style.marginLeft = tabs[i].getAttribute(this.kNEST)+'em';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
initUIShowHideObserver : function TSTWindow_initUIShowHideObserver()
|
initUIShowHideObserver : function TSTWindow_initUIShowHideObserver()
|
||||||
|
Loading…
Reference in New Issue
Block a user