FIX: when opening links in new window link only worked once
This commit is contained in:
parent
01bb2d4c31
commit
c2c4e03e0f
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue