You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-22 18:41:57 +03:00
correctly calculate last node in viewport
these variables are now relative to bottom of timeline, before it was the top
This commit is contained in:
@ -555,7 +555,7 @@ module.exports = React.createClass({
|
|||||||
node = messages[i];
|
node = messages[i];
|
||||||
// break at the first message (coming from the bottom)
|
// break at the first message (coming from the bottom)
|
||||||
// that has it's offsetTop above the bottom of the viewport.
|
// that has it's offsetTop above the bottom of the viewport.
|
||||||
if (node.offsetTop < viewportBottom) {
|
if (this._topFromBottom(node) > viewportBottom) {
|
||||||
// Use this node as the scrollToken
|
// Use this node as the scrollToken
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user