firefox / concurrency fix, would not navigate correctly to a post.
posts can be in the DOM in a non-ready state between willInsertElement and didInsertElement didInsertElement takes care of the scrolling, ignore analysing anything about that post until its properly inserted
This commit is contained in:
parent
8c053b8e83
commit
54fed60ecb
|
@ -243,6 +243,7 @@ Discourse.PostView = Discourse.View.extend({
|
|||
// Find all the quotes
|
||||
this.insertQuoteControls();
|
||||
|
||||
$post.addClass('ready');
|
||||
// be sure that eyeline tracked it
|
||||
var controller = this.get('controller');
|
||||
if (controller && controller.postRendered) {
|
||||
|
|
|
@ -397,7 +397,7 @@ Discourse.TopicView = Discourse.View.extend(Discourse.Scrolling, {
|
|||
|
||||
updatePosition: function(userActive) {
|
||||
|
||||
var rows = $('.topic-post');
|
||||
var rows = $('.topic-post.ready');
|
||||
if (!rows || rows.length === 0) { return; }
|
||||
|
||||
// if we have no rows
|
||||
|
@ -486,7 +486,8 @@ Discourse.TopicView = Discourse.View.extend(Discourse.Scrolling, {
|
|||
latestLink: "<a href=\"/\">" + (Em.String.i18n("topic.view_latest_topics")) + "</a>"
|
||||
};
|
||||
|
||||
if (category = this.get('controller.content.category')) {
|
||||
category = this.get('controller.content.category');
|
||||
if (category) {
|
||||
opts.catLink = Discourse.Utilities.categoryLink(category);
|
||||
} else {
|
||||
opts.catLink = "<a href=\"" + Discourse.getURL("/categories") + "\">" + (Em.String.i18n("topic.browse_all_categories")) + "</a>";
|
||||
|
|
Loading…
Reference in New Issue