fix(router): allow open new tab with ctrl + click (#69)

* fix(router): allow open new tab with ctrl + click

* chore: add other keys
pull/77/head
Carlos Rodrigues 4 years ago committed by GitHub
parent 5daaa90989
commit 092ee772da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -97,6 +97,10 @@ export function createRouter(
const currentUrl = window.location
// only intercept inbound links
if (
!e.ctrlKey &&
!e.shiftKey &&
!e.altKey &&
!e.metaKey &&
target !== `_blank` &&
protocol === currentUrl.protocol &&
hostname === currentUrl.hostname

Loading…
Cancel
Save