mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 18:24:52 -06:00
FIX: Respect "open external links in new window" in quotes and edit history
This commit is contained in:
parent
7a27c93c03
commit
ca9fd95a08
@ -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");
|
||||
}
|
||||
});
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user