From 7d4d709587a49ea77758fbacfcadbf6847546955 Mon Sep 17 00:00:00 2001 From: Shawn Kelly Date: Tue, 21 Feb 2017 12:08:54 -0600 Subject: [PATCH] fix: cmd+click Links (#1233) Check currentTarget is 'A', not target. This is important when an anchor tag wraps another dom node. --- lib/link.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/link.js b/lib/link.js index 235bd982..d63567c2 100644 --- a/lib/link.js +++ b/lib/link.js @@ -25,7 +25,7 @@ export default class Link extends Component { } linkClicked (e) { - if (e.target.nodeName === 'A' && + if (e.currentTarget.nodeName === 'A' && (e.metaKey || e.ctrlKey || e.shiftKey || (e.nativeEvent && e.nativeEvent.which === 2))) { // ignore click for new tab / new window behavior return