I try to work on an interface on html5 for mobile. i try to follow a mouvement, with touchstart/touchmove/touchend/touchcancel. but when i try to follow a mouvement i allways quikly have au 'touchcancel' and no more touchmove then...
when i try this : http://miniapps.co.uk/code/touchcancel/ it work perfectly, i do not have any problem.
But i think the problem come from the mouvement of the web browser that interfering with my canvas. Do you know can i fix this ?
// I try to explain more : - Here is my test code : http://frys.free.fr/mNaissance/test.html it's the "Jigsaw" puzzle code that i try to make working with a mobile. I had a "log" div hunder the text. And when i do "touchmove" on the grey canvas i have very fast a 'touchcancel' and no anymore 'touchmove' Is it more clear ? sorry for my poor english !
Thanks for help
I believe I found out the reason for this - Android browser (as well as Chrome for Android 4.0+) believes you are trying to scroll, so it fires the touchcancel event. What you should do is
event.preventDefault();
on touchmove event you are capturing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With