diff --git a/app/assets/javascripts/discourse/components/topic-timeline.js.es6 b/app/assets/javascripts/discourse/components/topic-timeline.js.es6 index 59328d05e36..cbc88e7ffc8 100644 --- a/app/assets/javascripts/discourse/components/topic-timeline.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-timeline.js.es6 @@ -8,6 +8,7 @@ export default MountWidget.extend(Docking, { buildArgs() { return { topic: this.get('topic'), topicTrackingState: this.topicTrackingState, + enteredIndex: this.get('enteredIndex'), dockAt: this.dockAt }; }, diff --git a/app/assets/javascripts/discourse/controllers/topic.js.es6 b/app/assets/javascripts/discourse/controllers/topic.js.es6 index 7e67aa00c5b..82efda4dc14 100644 --- a/app/assets/javascripts/discourse/controllers/topic.js.es6 +++ b/app/assets/javascripts/discourse/controllers/topic.js.es6 @@ -19,6 +19,7 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, { queryParams: ['filter', 'username_filters', 'show_deleted'], loadedAllPosts: Ember.computed.or('model.postStream.loadedAllPosts', 'model.postStream.loadingLastPost'), enteredAt: null, + enteredIndex: null, retrying: false, topicDelegated: [ diff --git a/app/assets/javascripts/discourse/routes/topic-from-params.js.es6 b/app/assets/javascripts/discourse/routes/topic-from-params.js.es6 index afd819a49e2..99ab6005de7 100644 --- a/app/assets/javascripts/discourse/routes/topic-from-params.js.es6 +++ b/app/assets/javascripts/discourse/routes/topic-from-params.js.es6 @@ -32,6 +32,7 @@ export default Discourse.Route.extend({ topicController.setProperties({ 'model.currentPost': closest, + enteredIndex: postStream.get('stream').indexOf(closestPost.get('id')), enteredAt: new Date().getTime().toString(), }); diff --git a/app/assets/javascripts/discourse/templates/topic.hbs b/app/assets/javascripts/discourse/templates/topic.hbs index cea89bd9f8c..091c41eec6e 100644 --- a/app/assets/javascripts/discourse/templates/topic.hbs +++ b/app/assets/javascripts/discourse/templates/topic.hbs @@ -72,7 +72,10 @@