diff --git a/app/assets/javascripts/discourse/lib/click_track.js b/app/assets/javascripts/discourse/lib/click_track.js index 5ae8074320b..09a360474f0 100644 --- a/app/assets/javascripts/discourse/lib/click_track.js +++ b/app/assets/javascripts/discourse/lib/click_track.js @@ -116,6 +116,14 @@ Discourse.ClickTrack = { if (Discourse.User.currentProp('external_links_in_new_tab')) { var win = window.open(trackingUrl, '_blank'); win.focus(); + + // restore href + setTimeout(function(){ + $link.removeClass('no-href'); + $link.attr('href', $link.data('href')); + $link.data('href', null); + },50); + } else { Discourse.URL.redirectTo(trackingUrl); }