davebalmer / jo

Jo (0.5.0) is a thin (~16K) candy shell for making HTML5 apps. Jo works with: PhoneGap, Chrome, Safari, Opera, FireFox, iOS, Android, BlackBerry 10, Tizen, & Windows Phone 8+. Features include skinnable UI widgets, a clean event model and a light data layer.
MIT License
1.2k stars 180 forks source link

Eliminate Tap Delay On Mobile #93

Open kesne opened 10 years ago

kesne commented 10 years ago

On mobile devices there's around a 300ms delay when tapping elements. This has been pretty well documented.

There are some libraries that aim to solve this like fastclick. Jo could implement it by changing what the selectEvent is on mobile devices and redefine it as a touchstart event.

Thoughts?

davebalmer commented 10 years ago

Yeah, I had removed it on 0.4.1, but ran into some issues on Tizen and... IE? So I reverted back to tap events and took the delay for now. Well spotted. :)

kesne commented 10 years ago

If that's the case maybe platform detect and only use the touchstart event on iOS and Android? I don't think it's an issue on Firefox and FirefoxOS if you set user-scalable to false.

davebalmer commented 10 years ago

Yes; will most likely have different scheme for "troubled" platforms (iOS and Android may be the only ones). The touch event scheme is also due for an overhaul at some point. :)

kesne commented 10 years ago

You're probably right there, although as a temporary fix for this I think this would be acceptable. Especially given that 300ms of touch delay sucks.