Skip to content

Commit

Permalink
fix(router): allow open new tab with ctrl + click (#69)
Browse files Browse the repository at this point in the history
* fix(router): allow open new tab with ctrl + click

* chore: add other keys
  • Loading branch information
pikax authored Sep 3, 2020
1 parent 5daaa90 commit 092ee77
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/client/app/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 092ee77

Please sign in to comment.