Change to the touchstart
event instead of touchmove
. Under One Finger Events it says that no events are sent during a pan, so touchmove
may be too late.
I added the listener to document, not body.
Example:
document.ontouchstart = function(e){
e.preventDefault();
}