-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ctrl + click to open link in new tab not working #68
Comments
Hi @marvinhagemeister! I've got two questions before applying the fix:
|
Ok, I jest checked and seems like it's going to be compatible with React, their And regarding 2: the check is needed in order to ignore all none-left button clicks. Seems like it should work! |
@molefrog Holy moly that was quick! Happy to hear that you found the answers already 👍 Super excited about this router as this is the first one where I think "yep this is how a router should be done". Love it 💯 |
For desktop browsers there are typical navigation patterns to open the link in a new tab instead of the current one. The most common one is
ctrl + click
or clicking with the middle mouse button. Currently this doesn't work because the event will always be prevented:wouter/index.js
Lines 91 to 98 in c9c7900
In
preact-router
we have this line which explicitly checks for common key combinations and lets the browser handle the event instead:https://github.com/preactjs/preact-router/blob/3eb5b31fe75c34672eeb13f2d310dee6d51b1f97/src/index.js#L112
The text was updated successfully, but these errors were encountered: