A platform for community discussion. Free, open, simple.
FIX: timeline shouldn't dock unless all posts are loaded (#33801)
Krisa9e89e79dcaa
diff --git a/app/assets/javascripts/discourse/app/components/topic-timeline/container.gjs b/app/assets/javascripts/discourse/app/components/topic-timeline/container.gjsindex 12710482ead..3b8856aeaad 100644--- a/app/assets/javascripts/discourse/app/components/topic-timeline/container.gjs+++ b/app/assets/javascripts/discourse/app/components/topic-timeline/container.gjs@@ -427,11 +427,13 @@ export default class TopicTimelineScrollArea extends Component {const prevDockAt = this.dockAt;const positionTop = headerOffset() + window.pageYOffset;const currentPosition = positionTop + timelineHeight;+ const postStream = this.args.model.postStream;+ const allPostsLoaded = postStream.loadedAllPosts;this.dockBottom = false;if (positionTop < this.topicTop) {this.dockAt = parseInt(this.topicTop, 10);- } else if (currentPosition > this.topicBottom) {+ } else if (allPostsLoaded && currentPosition > this.topicBottom) {this.dockAt = parseInt(this.topicBottom - timelineHeight, 10);this.dockBottom = true;if (this.dockAt < 0) {