Don't do smooth scroll if it is expressly forbidden

This commit is contained in:
Piro / YUKI Hiroshi 2015-03-18 02:33:41 +09:00
parent 0cae72fd00
commit 9f59a6ebe7

View File

@ -561,7 +561,8 @@ var TreeStyleTabWindowHelper = {
if (treeStyleTab) { if (treeStyleTab) {
if (treeStyleTab.shouldCancelEnsureElementIsVisible()) if (treeStyleTab.shouldCancelEnsureElementIsVisible())
return; return;
else if (treeStyleTab.animationEnabled) let shouldScrollNow = aArgs[1] === false;
if (treeStyleTab.animationEnabled && !shouldScrollNow)
return treeStyleTab.scrollToTab(aArgs[0]); return treeStyleTab.scrollToTab(aArgs[0]);
} }
this.__treestyletab__ensureElementIsVisible.apply(this, aArgs); this.__treestyletab__ensureElementIsVisible.apply(this, aArgs);