Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6751 from matrix-org/dbkr/fix_stuck_scroll
Browse files Browse the repository at this point in the history
Fix scroll being stuck at bottom
  • Loading branch information
dbkr authored Sep 7, 2021
2 parents 78617c0 + 6468ce6 commit 404ddad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/structures/ScrollPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ export default class ScrollPanel extends React.Component<IProps> {
// fractional values (both too big and too small)
// for scrollTop happen on certain browsers/platforms
// when scrolled all the way down. E.g. Chrome 72 on debian.
// so check difference <= 1;
return Math.abs(sn.scrollHeight - (sn.scrollTop + sn.clientHeight)) <= 1;
// so check difference < 1;
return Math.abs(sn.scrollHeight - (sn.scrollTop + sn.clientHeight)) < 1;
};

// returns the vertical height in the given direction that can be removed from
Expand Down

0 comments on commit 404ddad

Please sign in to comment.