link.setAttribute('target', '_blank');
link.setAttribute('rel', 'noopener');
}
-
- link.addEventListener('click', this.onNormalClick, false);
}
},
}
},
- onNormalClick (e) {
- e.stopPropagation();
- },
-
handleMouseDown (e) {
this.startXY = [e.clientX, e.clientY];
},
const [ startX, startY ] = this.startXY;
const [ deltaX, deltaY ] = [Math.abs(e.clientX - startX), Math.abs(e.clientY - startY)];
+ if (e.target.localName === 'a' || (e.target.parentNode && e.target.parentNode.localName === 'a')) {
+ return;
+ }
+
if (deltaX + deltaY < 5) {
this.props.onClick();
}