Skip to content

Custom (non-mouse) events do not work on router-link #1036

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

Closed
TremayneChrist opened this issue Dec 21, 2016 · 1 comment · Fixed by #1037
Closed

Custom (non-mouse) events do not work on router-link #1036

TremayneChrist opened this issue Dec 21, 2016 · 1 comment · Fixed by #1037

Comments

@TremayneChrist
Copy link

Only mouse events seem to work on router-link due to guardEvent

if (e.button !== 0) return

The button property is only available in MouseEvent I believe. Therefore, using CustomEvent is a no go. For example, using a tap event on mobile devices.

https://jsfiddle.net/qaj7xyx9/1/

fnlctrl added a commit that referenced this issue Dec 21, 2016
Fix checking e.button for non-mouse events on router-link (fix #1036)
@fnlctrl
Copy link
Member

fnlctrl commented Dec 21, 2016

Good catch, thanks!

yyx990803 pushed a commit that referenced this issue Dec 21, 2016
Fix checking e.button for non-mouse events on router-link (fix #1036)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants