mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 03:36:07 +03:00
take (potentially clipped) content height into account for filling
This commit is contained in:
parent
469511aa44
commit
2bcced72ad
1 changed files with 5 additions and 2 deletions
|
@ -298,11 +298,14 @@ module.exports = React.createClass({
|
|||
// `---------' -
|
||||
//
|
||||
|
||||
if (sn.scrollTop < sn.clientHeight) {
|
||||
const contentHeight = this._getMessagesHeight();
|
||||
const contentTop = contentHeight - this._getListHeight();
|
||||
const contentScrollTop = sn.scrollTop + contentTop;
|
||||
if (contentScrollTop < sn.clientHeight) {
|
||||
// need to back-fill
|
||||
this._maybeFill(true);
|
||||
}
|
||||
if (sn.scrollTop > sn.scrollHeight - sn.clientHeight * 2) {
|
||||
if (contentScrollTop > contentHeight - sn.clientHeight * 2) {
|
||||
// need to forward-fill
|
||||
this._maybeFill(false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue