mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
FIX: when opening links in new window link only worked once
This commit is contained in:
parent
01bb2d4c31
commit
c2c4e03e0f
1 changed files with 8 additions and 0 deletions
|
@ -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 a new issue