From 9f59a6ebe756b0558a5b901f62d76a77a46a6a6d Mon Sep 17 00:00:00 2001 From: Piro / YUKI Hiroshi Date: Wed, 18 Mar 2015 02:33:41 +0900 Subject: [PATCH] Don't do smooth scroll if it is expressly forbidden --- content/treestyletab/windowHelper.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/treestyletab/windowHelper.js b/content/treestyletab/windowHelper.js index 95eea34d..0834b6d5 100644 --- a/content/treestyletab/windowHelper.js +++ b/content/treestyletab/windowHelper.js @@ -561,7 +561,8 @@ var TreeStyleTabWindowHelper = { if (treeStyleTab) { if (treeStyleTab.shouldCancelEnsureElementIsVisible()) return; - else if (treeStyleTab.animationEnabled) + let shouldScrollNow = aArgs[1] === false; + if (treeStyleTab.animationEnabled && !shouldScrollNow) return treeStyleTab.scrollToTab(aArgs[0]); } this.__treestyletab__ensureElementIsVisible.apply(this, aArgs);