On Oculus Quest, the mousedown event seems to fire twice.
I think this is somehow related to
- https://github.com/aframevr/aframe/issues/3297
- https://github.com/aframevr/aframe/issues/4141
Here is a working
and a
not working
demo.
Before entering VR the button cube changes the state, but after that it doesn't since the function is executed twice.
A workaround seems to be to delay another execution like so:
```
if (this.waiting) {
console.log("sorry, no ...");
return;
}
this.waiting = true;
setTimeout(() => {
this.waiting = false;
console.log("reset ...");
}, 100);
```