Skip to content

Commit

Permalink
only allow pixel gaps of < 1px for stick to bottom to prevent eleweb bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bwindels committed Sep 15, 2021
1 parent 2c415e3 commit 1df12b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/web/ui/session/room/TimelineView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1df12b8

Please sign in to comment.