FIX: Can click on links in expanded blog posts

This commit is contained in:
Robin Ward
2014-04-05 20:05:48 -04:00
parent c82313595d
commit 802ee04e9d

View File

@ -85,7 +85,8 @@ Discourse.TopicView = Discourse.View.extend(Discourse.Scrolling, {
this.get('controller.streamPercentage'); this.get('controller.streamPercentage');
this.$().on('mouseup.discourse-redirect', '.cooked a, a.track-link', function(e) { this.$().on('mouseup.discourse-redirect', '.cooked a, a.track-link', function(e) {
if ($(e.target).hasClass('mention')) { return false; } var $target = $(e.target);
if ($target.hasClass('mention') || $target.parents('.expanded-embed').length) { return false; }
return Discourse.ClickTrack.trackClick(e); return Discourse.ClickTrack.trackClick(e);
}); });
}.on('didInsertElement'), }.on('didInsertElement'),