You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-21 07:42:09 +03:00
take (potentially clipped) content height into account for filling
This commit is contained in:
@ -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
|
// need to back-fill
|
||||||
this._maybeFill(true);
|
this._maybeFill(true);
|
||||||
}
|
}
|
||||||
if (sn.scrollTop > sn.scrollHeight - sn.clientHeight * 2) {
|
if (contentScrollTop > contentHeight - sn.clientHeight * 2) {
|
||||||
// need to forward-fill
|
// need to forward-fill
|
||||||
this._maybeFill(false);
|
this._maybeFill(false);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user