benmajor / jQuery-Touch-Events

A collection of mobile event plugins for jQuery.
MIT License
699 stars 225 forks source link

Not compatible with jQuery 3.6 #171

Closed AlbinFarstun closed 3 years ago

AlbinFarstun commented 3 years ago

If I go with jquery migrate (only tested with 3.0.0) it works fine, otherwise this is the output of the console:

jquery-3.6.0.min.js:2 Uncaught TypeError: r.getClientRects is not a function at S.fn.init.offset (jquery-3.6.0.min.js:2) at tapMoveFunc (jquery.mobile-events.js:132) at dispatch (jquery-3.6.0.min.js:2) at v.handle (jquery-3.6.0.min.js:2)

benmajor commented 3 years ago

I've just put this jsFiddle together, and it seems to run fine with 3.6?

https://jsfiddle.net/7xa0z23L/1/

AlbinFarstun commented 3 years ago

@benmajor you are correct sir! The error only occurs when I try to bind to window apparently. $(window).on('tapstart', ...) fails, tried it out in the fiddle. Not that big of a deal :)

benmajor commented 3 years ago

Ah yes, there is a known issue for binding to window actually. If you search the closed issues, you'll find it. Basically, just bind to document 😉