Skip to content

Commit 1f691ab

Browse files
Merge pull request #831 from preactjs/iso-cmd
2 parents 6e0ee5f + cd9a70a commit 1f691ab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

router.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ let push;
55
const UPDATE = (state, url) => {
66
push = undefined;
77
if (url && url.type === 'click') {
8+
// ignore events the browser takes care of already:
9+
if (url.ctrlKey || url.metaKey || url.altKey || url.shiftKey || url.button !== 0) {
10+
return;
11+
}
12+
813
const link = url.target.closest('a[href]');
914
if (
1015
!link ||

0 commit comments

Comments
 (0)