FIX: Posts weren't highlighting on initial load

This commit is contained in:
Robin Ward 2015-01-23 10:46:04 -05:00
parent c2da725f75
commit 848d60d459

View File

@ -34,7 +34,11 @@ export default Discourse.Route.extend({
progressPosition: progress,
expanded: false
});
self.appEvents.trigger('post:highlight', closest);
// Highlight our post after the next render
Ember.run.scheduleOnce('afterRender', function() {
self.appEvents.trigger('post:highlight', closest);
});
Discourse.URL.jumpToPost(closest);
if (topic.present('draft')) {