mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-10-21 19:16:23 +08:00
SrolltoTop optimization
This commit is contained in:
parent
7841658791
commit
b9a93e82ec
3 changed files with 14 additions and 3 deletions
|
@ -607,7 +607,7 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bFast)
|
if (bFast || 50 > this.oContentScrollable.scrollTop())
|
||||||
{
|
{
|
||||||
this.oContentScrollable.scrollTop(0);
|
this.oContentScrollable.scrollTop(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -325,7 +325,7 @@
|
||||||
this.testingDone(false);
|
this.testingDone(false);
|
||||||
this.testingImapError(false);
|
this.testingImapError(false);
|
||||||
this.testingSmtpError(false);
|
this.testingSmtpError(false);
|
||||||
}
|
};
|
||||||
|
|
||||||
DomainPopupView.prototype.onHide = function ()
|
DomainPopupView.prototype.onHide = function ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -639,8 +639,19 @@
|
||||||
MessageViewMailBoxUserView.prototype.scrollMessageToTop = function ()
|
MessageViewMailBoxUserView.prototype.scrollMessageToTop = function ()
|
||||||
{
|
{
|
||||||
if (this.oMessageScrollerDom)
|
if (this.oMessageScrollerDom)
|
||||||
|
{
|
||||||
|
if (50 < this.oMessageScrollerDom.scrollTop())
|
||||||
|
{
|
||||||
|
this.oMessageScrollerDom
|
||||||
|
.scrollTop(50)
|
||||||
|
.animate({'scrollTop': 0}, 200)
|
||||||
|
;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
this.oMessageScrollerDom.scrollTop(0);
|
this.oMessageScrollerDom.scrollTop(0);
|
||||||
|
}
|
||||||
|
|
||||||
Utils.windowResize();
|
Utils.windowResize();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue