Question

I'm having a bit of a problem figuring out how to get the X/Y coordinates of where the finger is touching in a webapp on iPhone Safari.

I've got a function subscribed to the 'touchstart', 'touchmove', and 'touchend' events, and I have tried pageX/pageY on the event but can't seem to get anything other than 'undefined' or 0.

I'm also thinking my keyword searching isn't quite right because I haven't found any clear documentation on exactly how to do this, anywhere.

Was it helpful?

Solution

The documentation you're looking for is here:

Apple Web Content Guide: Handling Multi-Touch Events

OTHER TIPS

You can also use

client.Y and client.X

To get the coordinates of X and Y.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top