GianlucaGuarini / Tocca.js

Super lightweight script (~1kb) to detect via Javascript events like 'tap' 'dbltap' 'swipeup' 'swipedown' 'swipeleft' 'swiperight' on any kind of device.
http://gianlucaguarini.github.io/Tocca.js/
MIT License
660 stars 60 forks source link

TypeError on Mobile Safari UI/WKWebView 13.1.X #65

Closed andreacimino closed 4 years ago

andreacimino commented 5 years ago

The iOS users of my Cordova app started exhibiting the problem after they upgraded their system to latest iOS version. Now tocca exhibits this problem:

TypeError: undefined is not an object

This is shown here in the latest version of tocca in this particular code:

var pointer = getPointerEvent(e) currX = pointer.pageX <- Here pointer is undefined

This issue is shown randomly I was not able to reproduce with my iPhone SE, I will try to understand which devices affect the problem with more debugging.

I am using Tocca with this configuration. window.tocca({ useJquery: false });

Aarbel commented 4 years ago

Do you still face this problem ?

iOS13 WkWebview handles touch and click events in a different way. They broke a lot of stacks using WkWebview. Don't really understand why google / apple continue to mantain native langages and don't use html / css / js every time.