only allow pixel gaps of < 1px for stick to bottom to prevent eleweb bug

https://github.com/matrix-org/matrix-react-sdk/pull/6751
This commit is contained in:
Bruno Windels 2021-09-15 17:23:53 +02:00
parent 2c415e37e7
commit 1df12b8c89

View file

@ -143,7 +143,7 @@ export class TimelineView extends TemplateView<TimelineViewModel> {
const tiles = this.tilesView!.root() as HTMLElement;
let bottomNodeIndex;
this.stickToBottom = Math.abs(scrollHeight - (scrollTop + clientHeight)) < 5;
this.stickToBottom = Math.abs(scrollHeight - (scrollTop + clientHeight)) < 1;
if (this.stickToBottom) {
const len = this.value.tiles.length;
bottomNodeIndex = len - 1;