You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When touching the screen on a mobile device (Android and iOS confirmed) while having onClick specified, the onClick event fires twice. This appears to be a common bug with handling touch events across several libraries. Both the touch event and click events fire and it is necessary to handle them together and detect if touch event has already run when you are evaluating the click event.
I am not sure where in the code base these events are handled or I would have tried to fix it.
Thanks, I've never noticed that. I've seen that the "new" pointer events are recommended instead of the old mouse events. The unsupported browsers have a small market share percent and can be ignored IMO.
I think a 2.2.2 will be released today with this fix.
Contact Details
No response
What happened?
When touching the screen on a mobile device (Android and iOS confirmed) while having onClick specified, the onClick event fires twice. This appears to be a common bug with handling touch events across several libraries. Both the touch event and click events fire and it is necessary to handle them together and detect if touch event has already run when you are evaluating the click event.
I am not sure where in the code base these events are handled or I would have tried to fix it.
tsParticles Version
2.2.1
Which library are you using?
React.js (react-particles, react-tsparticles, react-particles-js)
tsParticles Configuration
What browsers are you seeing the problem on?
Firefox, Chrome, Safari
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: