From 21313294428d97b0767388634ceb3f4383d2ffcb Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Sun, 16 Jun 2019 16:39:20 +0200 Subject: [PATCH] scroll to bottom when loading timeline --- src/ui/web/session/room/TimelineList.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ui/web/session/room/TimelineList.js b/src/ui/web/session/room/TimelineList.js index 524c78fc..0045a0fc 100644 --- a/src/ui/web/session/room/TimelineList.js +++ b/src/ui/web/session/room/TimelineList.js @@ -16,6 +16,12 @@ export default class TimelineList extends ListView { this._atBottom = false; } + _loadList() { + super._loadList(); + const root = this.root(); + root.scrollTop = root.scrollHeight; + } + onBeforeListChanged() { const root = this.root(); const fromBottom = root.scrollHeight - root.scrollTop - root.clientHeight;