vue-fontawesome
vue-fontawesome copied to clipboard
Click event is emitted twice after clicking the icon a second time
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
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.
Exact same issue here.
Bug occurred on both 3.0.0-3 and 3.0.0-4.
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.
Same here. You should use a wrapper element. But still I think it is a bug.