Many people have encountered this problem before. You can remove this delay by adding a small library named "fastclick.js". Here is a simple solution which works quiet fine for me. Stop 300ms onclick delay on Android web browser
OnClick event handler on mobile devices?
-
12-07-2023 - |
Question
I made sort of a mobile game with HTML5 and JavaScript. I only get a big problem when I open the game in my browser on my localhost (on my mobile)! To make one thing clear: I run it in my mobile browser, so it is not like an app.
This thing is when I touch the screen on my mobile, it has a little delay before it runs the action. Also the game got a sort of selected when I click on it. Just to be sure: I have used the ONCLICK event.
So my question is: What am I doing wrong? Am I picking wrong event handlers for mobile devices or something in that way, or do I put my FPS (Frames Per Second) rate too high for a mobile device?
PS. The game is tested with an iPhone 4s on Safari!
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow