SrolltoTop optimization

This commit is contained in:
RainLoop Team 2014-11-20 03:25:39 +04:00
parent 7841658791
commit b9a93e82ec
3 changed files with 14 additions and 3 deletions

View file

@ -607,7 +607,7 @@
return false;
}
if (bFast)
if (bFast || 50 > this.oContentScrollable.scrollTop())
{
this.oContentScrollable.scrollTop(0);
}

View file

@ -325,7 +325,7 @@
this.testingDone(false);
this.testingImapError(false);
this.testingSmtpError(false);
}
};
DomainPopupView.prototype.onHide = function ()
{

View file

@ -640,7 +640,18 @@
{
if (this.oMessageScrollerDom)
{
this.oMessageScrollerDom.scrollTop(0);
if (50 < this.oMessageScrollerDom.scrollTop())
{
this.oMessageScrollerDom
.scrollTop(50)
.animate({'scrollTop': 0}, 200)
;
}
else
{
this.oMessageScrollerDom.scrollTop(0);
}
Utils.windowResize();
}
};