Brush up codes
This commit is contained in:
parent
bc0c05e1a5
commit
ccbc8855e9
@ -643,11 +643,12 @@ var TreeStyleTabWindowHelper = {
|
|||||||
if (!scrollbox.__treestyletab__ensureElementIsVisible) {
|
if (!scrollbox.__treestyletab__ensureElementIsVisible) {
|
||||||
scrollbox.__treestyletab__ensureElementIsVisible = scrollbox.ensureElementIsVisible;
|
scrollbox.__treestyletab__ensureElementIsVisible = scrollbox.ensureElementIsVisible;
|
||||||
scrollbox.ensureElementIsVisible = function(...aArgs) {
|
scrollbox.ensureElementIsVisible = function(...aArgs) {
|
||||||
if (b.treeStyleTab.shouldCancelEnsureElementIsVisible())
|
var treeStyleTab = gBrowser.treeStyleTab;
|
||||||
|
if (treeStyleTab.shouldCancelEnsureElementIsVisible())
|
||||||
return;
|
return;
|
||||||
let shouldScrollNow = aArgs[1] === false;
|
let shouldScrollNow = aArgs[1] === false;
|
||||||
if (b.treeStyleTab.animationEnabled && !shouldScrollNow)
|
if (treeStyleTab.animationEnabled && !shouldScrollNow)
|
||||||
return b.treeStyleTab.scrollToTab(aArgs[0]);
|
return treeStyleTab.scrollToTab(aArgs[0]);
|
||||||
scrollbox.__treestyletab__ensureElementIsVisible.call(this, ...aArgs);
|
scrollbox.__treestyletab__ensureElementIsVisible.call(this, ...aArgs);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user