Always override ensureElementIsVisible() if animation effect is active
This commit is contained in:
parent
784f3d875a
commit
283a79e56c
@ -558,15 +558,12 @@ var TreeStyleTabWindowHelper = {
|
|||||||
scrollbox.__treestyletab__ensureElementIsVisible = scrollbox.ensureElementIsVisible;
|
scrollbox.__treestyletab__ensureElementIsVisible = scrollbox.ensureElementIsVisible;
|
||||||
scrollbox.ensureElementIsVisible = function(...aArgs) {
|
scrollbox.ensureElementIsVisible = function(...aArgs) {
|
||||||
var treeStyleTab = TreeStyleTabService.getTabBrowserFromChild(this).treeStyleTab;
|
var treeStyleTab = TreeStyleTabService.getTabBrowserFromChild(this).treeStyleTab;
|
||||||
if (treeStyleTab && treeStyleTab.shouldCancelEnsureElementIsVisible())
|
if (treeStyleTab) {
|
||||||
|
if (treeStyleTab.shouldCancelEnsureElementIsVisible())
|
||||||
return;
|
return;
|
||||||
|
else if (treeStyleTab.animationEnabled)
|
||||||
if (
|
|
||||||
treeStyleTab &&
|
|
||||||
(aArgs.length == 1 || aArgs[1])
|
|
||||||
)
|
|
||||||
return treeStyleTab.scrollToTab(aArgs[0]);
|
return treeStyleTab.scrollToTab(aArgs[0]);
|
||||||
|
}
|
||||||
this.__treestyletab__ensureElementIsVisible.apply(this, aArgs);
|
this.__treestyletab__ensureElementIsVisible.apply(this, aArgs);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user