Skip to content
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

IOS 14 and up - slider won't scroll on drag #2380

Open
ThomasHoadley opened this issue Jun 11, 2024 · 0 comments
Open

IOS 14 and up - slider won't scroll on drag #2380

ThomasHoadley opened this issue Jun 11, 2024 · 0 comments

Comments

@ThomasHoadley
Copy link

On mobile, IOS 14 and up (chrome and safari), the slider does not scroll when dragging it.

I have found that the following snippet seems to fix it.

Fix

document.addEventListener("touchstart", () => {}, { passive: false });

It works by overriding the touchStart event to not be passive, meaning that e.preventDefault() can run on this event, which seems to be a requirement for Slick Slider.

I'm not sure if I have missed a less hacky fix for this though. Has any one else solved this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant