aframevr / aframe

:a: Web framework for building virtual reality experiences.
https://aframe.io/
MIT License
16.69k stars 3.98k forks source link

touch event delay #3707

Closed csigmanek closed 6 years ago

csigmanek commented 6 years ago

Description: We are trying to implement a click event when you touch an Element. Works perfectly in desktop, but has some serious issues in mobile. We tried it with different a-components. 1st: Click is executed on page load 2nd: You cannot click twice on the same element. You have to click on another element first before you can click on a clicked event again. 3rd: There is a delay of about 700 ms until the event fires. This is really serious, as we cannot prevent it.

pancakewaffles commented 6 years ago

I faced this problem before. Not sure if it has something to do with the click delay implemented in mobile browsers to distinguish different gestures. https://developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away

Instead of using 'click', I used 'mousedown'.

csigmanek commented 6 years ago

Mousedown works and the other two issues don't occur anymore when using mousedown. Thanks alot. Perhaps you should encourage everyone using mousedown only in aframe.