Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Do not prevent default behavior of link if Ctrl is pressed #49

Closed
Onatolich opened this issue May 1, 2019 · 2 comments
Closed

Do not prevent default behavior of link if Ctrl is pressed #49

Onatolich opened this issue May 1, 2019 · 2 comments
Labels
bug Something isn't working
Projects

Comments

@Onatolich
Copy link

Currently if you will click on link with Ctrl pressed new tab won't be open because default behavior is prevented.

@Paratron
Copy link
Owner

Paratron commented May 1, 2019

You are correct and I support that!

More things came to my mind. What, when you focus the link using the tab key and then pressing enter? Thats not even a click. What if some browsers/oses do things different on ALT+click? Or SHIFT+click? I need to think this through for a bit. Sadly there is no such thing like a navigate event for a link, so those cases need to be handled separately.

I guess it boils down to "only prevent default when a left mouse button click (or tap) happens without any modifier key pressed" and "prevent default on keyboard enter/space hit".

Phew.

@Paratron Paratron added the bug Something isn't working label May 1, 2019
@Paratron
Copy link
Owner

Paratron commented May 2, 2019

This is resolved with 1.2.2 and available on npm now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Version 2.0
  
Awaiting triage
Development

No branches or pull requests

2 participants