diff --git a/app/assets/javascripts/discourse/components/links-redirect.js.es6 b/app/assets/javascripts/discourse/components/links-redirect.js.es6 index fdb5c11a48..84d5f890f0 100644 --- a/app/assets/javascripts/discourse/components/links-redirect.js.es6 +++ b/app/assets/javascripts/discourse/components/links-redirect.js.es6 @@ -4,13 +4,13 @@ export default Ember.Component.extend({ didInsertElement() { this._super(...arguments); - this.$().on("click.discourse-redirect", "#revisions a", function(e) { + $(this.element).on("click.discourse-redirect", "a", function(e) { return ClickTrack.trackClick(e); }); }, willDestroyElement() { this._super(...arguments); - this.$().off("click.discourse-redirect", "#revisions a"); + $(this.element).off("click.discourse-redirect", "a"); } }); diff --git a/app/assets/javascripts/discourse/lib/click-track.js.es6 b/app/assets/javascripts/discourse/lib/click-track.js.es6 index d4d0e71f2e..4728abf088 100644 --- a/app/assets/javascripts/discourse/lib/click-track.js.es6 +++ b/app/assets/javascripts/discourse/lib/click-track.js.es6 @@ -18,8 +18,8 @@ export function isValidLink($link) { return false; } - // Do not track links in quotes or in elided part - if ($link.parents("aside.quote, .elided").length !== 0) { + // Do not track links in elided part + if ($link.parents(".elided").length !== 0) { return false; }