Reimplement _saveScrollState
The actual fix to https://github.com/vector-im/riot-web/issues/3175 is this change to `_saveScrollState`, which is to pick the trackedScrollToken based on which node is intersected by the bottom of the scroll panel. This is opposed to the previous logic that picked based on which node was the first from the bottom to be above the bottom of the viewport. In the case where the viewport bottom does not intersect any events, the topmost event is used.
This commit is contained in:
parent
8e5a83a056
commit
94fe9999db
2 changed files with 22 additions and 11 deletions
|
@ -263,7 +263,7 @@ var TimelinePanel = React.createClass({
|
|||
}
|
||||
);
|
||||
|
||||
let count = backwards ? marker : this.state.events.length - marker;
|
||||
let count = backwards ? marker + 1 : this.state.events.length - marker;
|
||||
|
||||
if (count > 0) {
|
||||
debuglog("TimelinePanel: Unpaginating", count, "in direction", dir);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue