I\'m trying to implement a menu for a ios webkit based app in which the user touches/clicks and holds a menu button (\'.menu_item\'), after 500ms the sub menu opens (div.slide_u
For your "touchmove" event;
If you do not want to do anything on touchmove:
return false;
If you with to prevent the default behavior but execute some code on touchmove:
e.preventDefault();
This issue is more pronounced on iPads.
If you don't need to use multitouch data, you may keep using mouseup on ipad.
further reading: http://developer.apple.com/library/IOS/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
touchend does not fire because touchcancel has fired earlier. If you want full touch evens handling you need to call
e.preventDefault()
in the callback of "touchmove" event, otherwise when a touchmove event occurs if the browser decides that this is a scroll event it will fire touchcancel and never fire touchend.
Maybe it's a bit late to answer. This event will never fire, because touch events fire on the very element on which touchstart happened. So, to do what you want to, one solution is to use document.elementFromPoint method, to which you will send appropriate x and y coordinates.