madrobby/zepto — Issue #407: longtap assumes that timers will always fire exactly at or above 750ms
Author: wesj
Created: 2012-02-25 01:11:08+00:00
State: open

Longtap current attaches a timer and stores the time of the touchstart event. When the timer fires, it compares the touchstart time and the current time and assumes that it should be at least the timer length or longer. In Gecko (unfortunately?), that's not always true. Timers only fire approximately at the time requested. It would be nice to have some leeway in there (i.e. if (dt >= 750ms - 10ms) its a longtap).

Alternatively, you could remove the timer on touchup/move and just assume that if the timer goes off its a long tap.