diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index e64e1f88..83a6438e 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -125,6 +125,20 @@ TreeStyleTabBrowser.prototype = { var container = document.getAnonymousElementByAttribute(b.mTabContainer, 'class', 'tabs-container'); if (container) container.removeAttribute('overflow'); + window.setTimeout(function() { + var inner = document.getAnonymousElementByAttribute(b.mTabContainer, 'class', 'tabbrowser-arrowscrollbox'); + if (inner) inner = document.getAnonymousElementByAttribute(inner, 'anonid', 'scrollbox'); + if (inner) inner = document.getAnonymousNodes(inner)[0]; + if ( + inner && + ( + inner.boxObject.width > container.boxObject.width || + inner.boxObject.height > container.boxObject.height + ) + ) { + container.setAttribute('overflow', true); + } + }, 100); /* Closing collapsed last tree breaks selected tab. To solve this problem, I override the setter to