Cancel previous scroll if the new to-be-scrolled tab is in the viewport

This commit is contained in:
YUKI Hiroshi 2015-03-17 18:57:12 +09:00
parent d41a66603e
commit 0cae72fd00

View File

@ -6654,7 +6654,11 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
scrollToTab : function TSTBrowser_scrollToTab(aTab, aOnlyWhenCurrentTabIsInViewport) scrollToTab : function TSTBrowser_scrollToTab(aTab, aOnlyWhenCurrentTabIsInViewport)
{ {
if (!aTab || !aTab.parentNode || this.isTabInViewport(aTab)) if (!aTab || !aTab.parentNode)
return;
this.cancelPerformingAutoScroll(true);
if (this.isTabInViewport(aTab))
return; return;
var b = this.mTabBrowser; var b = this.mTabBrowser;