on Chrome and iOS off the jquery event object passed to the touchmove event listener, simply event.pageX and event.pageY returned coordinates as expected. However, Android always returned zero.
You can find a bunch of posts about needing to preventDefault to get the touchmove event to trigger in the first place....
But to get the coordinates, this object seems to work:
window.event.touches[0]
So I'm using something along these lines ...
if (window.event.touches) event = window.event.touches[0];
Then I use event.pageX and event.pageY as expected...
No comments:
Post a Comment