The Android app I'm working on relies on a potentially long series of touchmove events from the user. Some of these touchmove events do not cause a lot of computation, but some do. It seems that I was bitten by this Android WebKit feature
where the touchcancel event will be fired if the touchmove handler does not return within ~ 200 ms. According to this answer to this error report
1: for sites with optimized mobility (with width = viewports of device width) you can rely on always getting continuous touch events. Therefore, touch sites should use mobile to show that they are designed to work on mobile devices.
Unfortunately, this does not work for me. The affected parts of the application are HTML pages with the following view parameter:
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1,
minimum-scale=1, width=device-width, target-densitydpi=device-dpi" />
With this setting, I see that touchcancel events are fired when the touchmove event takes too much time. I tried to make touchmove events faster, but increasing speed, so this problem does not occur, because often this is not the right solution. Is there a way to prevent touchcancel events, or at least get around them?
Many thanks!
source
share