Merge pull request #6751 from matrix-org/dbkr/fix_stuck_scroll

Fix scroll being stuck at bottom
This commit is contained in:
David Baker 2021-09-07 09:48:17 +01:00 committed by GitHub
commit 404ddad961
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -275,8 +275,8 @@ export default class ScrollPanel extends React.Component<IProps> {
// fractional values (both too big and too small) // fractional values (both too big and too small)
// for scrollTop happen on certain browsers/platforms // for scrollTop happen on certain browsers/platforms
// when scrolled all the way down. E.g. Chrome 72 on debian. // when scrolled all the way down. E.g. Chrome 72 on debian.
// so check difference <= 1; // so check difference < 1;
return Math.abs(sn.scrollHeight - (sn.scrollTop + sn.clientHeight)) <= 1; return Math.abs(sn.scrollHeight - (sn.scrollTop + sn.clientHeight)) < 1;
}; };
// returns the vertical height in the given direction that can be removed from // returns the vertical height in the given direction that can be removed from