When the current tab is closed, auto scroll fired by tab focus was wrongly canceled.
This commit is contained in:
parent
dbe64fc13b
commit
68acdab242
@ -3523,11 +3523,14 @@ TreeStyleTabBrowser.prototype = {
|
||||
onScroll : function TSTBrowser_onScroll(aEvent)
|
||||
{
|
||||
if (this.lastScrollX < 0 || this.lastScrollY < 0) return;
|
||||
var x = {}, y = {};
|
||||
var scrollBoxObject = this.scrollBoxObject;
|
||||
// restore scroll position when a tab is closed.
|
||||
if (!this.smoothScrollTask) { // don't restore scroll position if another scroll is already running.
|
||||
let x = {}, y = {};
|
||||
let scrollBoxObject = this.scrollBoxObject;
|
||||
scrollBoxObject.getPosition(x, y);
|
||||
if (x.value != this.lastScrollX || y.value != this.lastScrollY)
|
||||
scrollBoxObject.scrollTo(this.lastScrollX, this.lastScrollY);
|
||||
}
|
||||
this.lastScrollX = -1;
|
||||
this.lastScrollY = -1;
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user