fix: cmd+click Links (#1233)

Check currentTarget is 'A', not target. This is important when an anchor tag wraps another dom node.
This commit is contained in:
Shawn Kelly 2017-02-21 12:08:54 -06:00 committed by Guillermo Rauch
parent 0ceeb6502a
commit 7d4d709587

View file

@ -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