I'm making a mobile site, and I need to disable the native iphone overflow scrolling. To do so, I called preventDefault on the touchmove function, but the problem is that I also need to get the position of the mouse release once the user calls the mouseup event. How can you call the mouseup event even after calling preventDefault on the touchmove event?
My code right now looks like:
document.ontouchmove = function(e){
e.preventDefault();
}
$(document).mousedown(function(e){
clickPosition = e.pageX;
});
$(document).mouseup(function(e){
releasePosition = e.pageX;
var positionDifference = clickPosition - releasePosition;
});