From 1df12b8c8950eae2933d25c53e8cd8b6b5a3140c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 15 Sep 2021 17:23:53 +0200 Subject: [PATCH] only allow pixel gaps of < 1px for stick to bottom to prevent eleweb bug https://github.com/matrix-org/matrix-react-sdk/pull/6751 --- src/platform/web/ui/session/room/TimelineView.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/web/ui/session/room/TimelineView.ts b/src/platform/web/ui/session/room/TimelineView.ts index 9c12d8d4..61fbca08 100644 --- a/src/platform/web/ui/session/room/TimelineView.ts +++ b/src/platform/web/ui/session/room/TimelineView.ts @@ -143,7 +143,7 @@ export class TimelineView extends TemplateView { 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;