diff --git a/src/platform/web/ui/session/room/TimelineView.ts b/src/platform/web/ui/session/room/TimelineView.ts index 1342d877..71af5f9f 100644 --- a/src/platform/web/ui/session/room/TimelineView.ts +++ b/src/platform/web/ui/session/room/TimelineView.ts @@ -71,6 +71,11 @@ export class TimelineView extends TemplateView { private tilesView?: TilesListView; render(t: TemplateBuilder, vm: TimelineViewModel) { + // assume this view will be mounted in the parent DOM straight away + requestAnimationFrame(() => { + // do initial scroll positioning + this.restoreScrollPosition(); + }); this.tilesView = new TilesListView(vm.tiles, () => this.restoreScrollPosition()); return t.div({className: "Timeline bottom-aligned-scroll", onScroll: () => this.onScroll()}, [ t.view(this.tilesView)