Skip to content
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

Click event is emitted twice after clicking the icon a second time #303

Open
ghost opened this issue Apr 23, 2021 · 4 comments
Open

Click event is emitted twice after clicking the icon a second time #303

ghost opened this issue Apr 23, 2021 · 4 comments

Comments

@ghost
Copy link

ghost commented Apr 23, 2021

Describe the bug
When generating icons in a v-for loop the click event is emitted twice after clicking it the second time.

Reproducible test case
https://codesandbox.io/s/summer-cache-th461

Expected behavior
A single click should only emit a single click event.

Desktop (please complete the following information):

  • Browser: Google Chrome Version 89.0.4389.128 (Official Build) (x86_64)
  • Vue Font Awesome Version: 3.0.0-3
@kad-tijhuo
Copy link

I ran into the same issue. Had to work around it by wrapping it with a div and listening to a click event on that element.

@Deckluhm
Copy link

Deckluhm commented Jun 4, 2021

Exact same issue here.

Bug occurred on both 3.0.0-3 and 3.0.0-4.

@christhofer
Copy link

As a best practice, you should use button or link for click action, so that the user can use keyboard to execute the action.
You can't use keyboard to click a div or icon.

@rrd108
Copy link

rrd108 commented Aug 4, 2021

Same here. You should use a wrapper element. But still I think it is a bug.

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

No branches or pull requests

4 participants