From 18ffa6e98b61bbf928918cd6b394fc04654514e6 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 19 May 2016 13:15:12 -0400 Subject: [PATCH] FIX: Don't dock the timeline when loading --- .../javascripts/discourse/components/topic-timeline.js.es6 | 2 ++ app/assets/javascripts/discourse/templates/topic.hbs | 1 + 2 files changed, 3 insertions(+) diff --git a/app/assets/javascripts/discourse/components/topic-timeline.js.es6 b/app/assets/javascripts/discourse/components/topic-timeline.js.es6 index ff4316f2808..59328d05e36 100644 --- a/app/assets/javascripts/discourse/components/topic-timeline.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-timeline.js.es6 @@ -12,6 +12,8 @@ export default MountWidget.extend(Docking, { }, dockCheck(info) { + if (this.get('loading')) { return; } + const topicBottom = $('#topic-bottom').offset().top; const $timeline = this.$('.timeline-container'); const timelineHeight = $timeline.height(); diff --git a/app/assets/javascripts/discourse/templates/topic.hbs b/app/assets/javascripts/discourse/templates/topic.hbs index e7457fb8ae6..aa46c38f445 100644 --- a/app/assets/javascripts/discourse/templates/topic.hbs +++ b/app/assets/javascripts/discourse/templates/topic.hbs @@ -73,6 +73,7 @@ {{#if showTimeline}} {{topic-timeline topic=model + loading=model.postStream.loading jumpTop="jumpTop" jumpToPost="jumpToPost" jumpBottom="jumpBottom"