FIX: Respect "open external links in new window" in quotes and edit history

This commit is contained in:
Penar Musaraj 2019-04-29 10:13:53 -04:00
parent 7a27c93c03
commit ca9fd95a08
2 changed files with 4 additions and 4 deletions

View File

@ -4,13 +4,13 @@ export default Ember.Component.extend({
didInsertElement() { didInsertElement() {
this._super(...arguments); 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); return ClickTrack.trackClick(e);
}); });
}, },
willDestroyElement() { willDestroyElement() {
this._super(...arguments); this._super(...arguments);
this.$().off("click.discourse-redirect", "#revisions a"); $(this.element).off("click.discourse-redirect", "a");
} }
}); });

View File

@ -18,8 +18,8 @@ export function isValidLink($link) {
return false; return false;
} }
// Do not track links in quotes or in elided part // Do not track links in elided part
if ($link.parents("aside.quote, .elided").length !== 0) { if ($link.parents(".elided").length !== 0) {
return false; return false;
} }