mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
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:
parent
0ceeb6502a
commit
7d4d709587
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue