diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 68f334b8..14558064 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -1209,6 +1209,26 @@ TreeStyleTabBrowser.prototype = { ) ); } + + /** + * The default implementation fails to scroll to tab if it is expanding. + * So we have to inject codes to override its effect. + */ + let (scrollbox = this.scrollBox) { + let source = scrollbox.ensureElementIsVisible.toSource(); + if (source.indexOf('treeStyleTab') < 0) { + eval('scrollbox.ensureElementIsVisible = '+ + source.replace( + '{', + .toString() + ) + ); + } + } }, _ensureNewSplitter : function TSTBrowser__ensureNewSplitter()