New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Slider] event.changedTouches undefined with old versions of jQuery #11763
Comments
Hi @jeremylind, thanks for reporting this. Can you test the proposed change? |
This is not recommended in general. Please try to use jQuery 2 or 3. |
https://codepen.io/DanielRuf/pen/yWQexO works for me on my smartphone. |
Both work for me on my smartphone so I can not reproduce it so far. |
Thanks for looking in to this @DanielRuf. I tried applying the patch from #11716 and it didn't make a difference. https://codepen.io/DanielRuf/pen/yWQexO and https://codepen.io/viewpoint/pen/YbRwwE do not work on my smartphone (Google Chrome on Andriod). Old versions of jQuery still come bundled with some apps like WordPress, so Foundation doesn't always get to dictate which version of jQuery will be used. |
Well, in most cases you can still use So far can not reproduce this on my Android smartphone in Chrome. So I have to do more tests. |
Closing as not reproducible. |
Expected Behavior
Slider is draggable on mobile devices using touch
Current Behavior
Slider is not draggable on mobile devices using touch when using older versions of jQuery.
Browser console reports: "Uncaught TypeError: Cannot read property '0' of undefined" on foundation.util.touch.js:133
event.changeTouches
does not exist.Possible Solution
Add a check to see if
changedTouches
exists onevent
object. If not, useevent.originalEvent.changedTouches
It looks like older versions of jQuery do not clone
changedTouches
from the original event to the jQuery event.Test Case and/or Steps to Reproduce (for bugs)
Test Case: https://codepen.io/viewpoint/pen/YbRwwE
How to reproduce:
Context
Using Foundation as part of another framework, such as WordPress, means Foundation might not get to decide what version of jQuery is loaded. Projects like WordPress use old versions of jQuery for backward compatibility.
Other reports
Your Environment
Checklist
The text was updated successfully, but these errors were encountered: