touchend event in ios webkit not firing?

感情迁移 提交于 2019-12-03 00:23:37

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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!