Skip to content

Commit

Permalink
ajax links trackimg improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
ConstantineYurevich committed Jul 11, 2017
1 parent fd05bb7 commit b29bb3f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/trackers/trackLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ function applyHandler(event, el, handler) {
} catch (error) {
// TODO
}

if (href && el.target !== '_blank' && !isMeta(event)) {

if (
href &&
el.target !== '_blank' &&
!isMeta(event) &&
!event.defaultPrevented &&
event.returnValue !== false
) {
preventDefault(event);
setTimeout(() => {
window.location.href = href;
Expand Down

0 comments on commit b29bb3f

Please sign in to comment.