Commit 7d4d7095 authored by Shawn Kelly's avatar Shawn Kelly Committed by Guillermo Rauch

fix: cmd+click Links (#1233)

Check currentTarget is 'A', not target. This is important when an anchor tag wraps another dom node.
parent 0ceeb650
...@@ -25,7 +25,7 @@ export default class Link extends Component { ...@@ -25,7 +25,7 @@ export default class Link extends Component {
} }
linkClicked (e) { linkClicked (e) {
if (e.target.nodeName === 'A' && if (e.currentTarget.nodeName === 'A' &&
(e.metaKey || e.ctrlKey || e.shiftKey || (e.nativeEvent && e.nativeEvent.which === 2))) { (e.metaKey || e.ctrlKey || e.shiftKey || (e.nativeEvent && e.nativeEvent.which === 2))) {
// ignore click for new tab / new window behavior // ignore click for new tab / new window behavior
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment