updated prepareTouchEvent function to use proper clientX/Y for mobile devices