I’m making a game and I just want to know when the pointer or finger is down/up. I listen to pointerdown and pointerup (or touchstart and touchend) which works as expected on windows chrome/android chrome/ios/mac, but on Firefox Android (or Firefox Windows when you simulate touch in the console).
In Firefox, if you touch and hold for a second without releasing, an unwanted pointerup event is fired that I can’t differentiate from a real touch and release. Why is such a basic spec not implemented the same way and how can I prevent or work around this behaviour in Firefox?
window.addEventListener('pointerdown', e => console.log('pointerdown', e)); window.addEventListener('pointerup', e => console.log('pointerup', e)); window.addEventListener('contextmenu', e => e.preventDefault());
(same behaviour for touch events)