diff --git a/app/assets/javascripts/discourse/components/topic-timeline.js.es6 b/app/assets/javascripts/discourse/components/topic-timeline.js.es6 index 1a5dcbbdd9e..ff4316f2808 100644 --- a/app/assets/javascripts/discourse/components/topic-timeline.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-timeline.js.es6 @@ -15,13 +15,14 @@ export default MountWidget.extend(Docking, { const topicBottom = $('#topic-bottom').offset().top; const $timeline = this.$('.timeline-container'); const timelineHeight = $timeline.height(); + const parentTop = $('.posts-wrapper').offset().top; const tTop = 140; const prev = this.dockAt; const pos = tTop + info.offset() + timelineHeight; if (pos > topicBottom) { - this.dockAt = topicBottom - timelineHeight - $timeline.offsetParent().offset().top; + this.dockAt = topicBottom - timelineHeight - parentTop; } else { this.dockAt = null; }