Events constantly being triggered on Firefox
Closed this issue · 3 comments
Great work, I have been using your lib for a couple of hours and everything works great on chrome, but for some reason on firefox the events buttonpress and buttonvaluechange are constantly being triggered without pressing any buttons.
Hi, thanks for the heads up. I should have time to check this out this week. Gamepad API implementations change often, so I wouldn't be surprised if the library needs some tweaking.
I ran the samples (examples/test.html is particularly useful) in Firefox to test, and I didn't observe any issues (on Firefox 72, using an Xbox One gamepad). What version of Firefox and what version of Gamepads.js are you using?
Also, could you please share your code, if it wasn't the sample that you observed the issue in?
Ok after some more testing I found my react useState hook was the problem, my bad!
Sorry and keep on coding!