Menu

The First Tap Never Counts: Touch Latency in Mobile Web Games
πŸ“°

The First Tap Never Counts: Touch Latency in Mobile Web Games

DEV Community: mobileΒ·Eka PutriΒ·about 8 hours ago
#3dSFNrSB
#devtomobile#devto#dev#touch#first
Reading 0:00
15s threshold

I logged every tap that did nothing for a week. On a mid-range Android phone the pattern was embarrassingly consistent: the first tap on a freshly loaded H5 game page produced no response at all, the second one hit the button I was aiming at. Put the timestamps side by side and the cause stops being mysterious.

The browser is not slow, it is waiting. After a page settles, a touch can still be read as the opening half of a double-tap gesture, so the engine holds the event for a few hundred milliseconds to see whether a second finger arrives. On a long article nobody notices. On a game where you tap a moving target, the page feels asleep.

The cheap fix is one CSS line: touch-action: manipulation on the tap surface, which tells the engine that zoom-on-double-tap is not wanted here.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.