From f639cf2145ecfa35ea31b91c05774a74f40923fa Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Tue, 17 Mar 2015 17:52:08 +0900 Subject: [PATCH] Don't update ensureElementIsVisible() twice --- content/treestyletab/windowHelper.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/treestyletab/windowHelper.js b/content/treestyletab/windowHelper.js index 99efc4c2..60362a33 100644 --- a/content/treestyletab/windowHelper.js +++ b/content/treestyletab/windowHelper.js @@ -554,6 +554,7 @@ var TreeStyleTabWindowHelper = { */ { let scrollbox = aTabBrowser.treeStyleTab.scrollBox; + if (!scrollbox.__treestyletab__ensureElementIsVisible) { scrollbox.__treestyletab__ensureElementIsVisible = scrollbox.ensureElementIsVisible; scrollbox.ensureElementIsVisible = function(...aArgs) { var treeStyleTab = TreeStyleTabService.getTabBrowserFromChild(this).treeStyleTab; @@ -568,6 +569,7 @@ var TreeStyleTabWindowHelper = { this.__treestyletab__ensureElementIsVisible.apply(this, aArgs); }; + } } {