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

keen slider disabling double tap/pinch to zoom in/out? #237

Closed
rizabek-mukanov opened this issue Jun 9, 2022 · 4 comments
Closed

keen slider disabling double tap/pinch to zoom in/out? #237

rizabek-mukanov opened this issue Jun 9, 2022 · 4 comments

Comments

@rizabek-mukanov
Copy link

i have modal with images where every image is keen slider slide. apparently double tap and pinch are not working to zoom.
is it intentionally done by lib? i was thinking keen slider itself handle slide events and thats why it disables some other events

@rcbyr
Copy link
Owner

rcbyr commented Jun 11, 2022

Hey @rizabek-mukanov

yes, this is intentional for the default slider.
You just have to remove the keen-slider class and add the minimum needed styles to the wrapper. See here: https://codesandbox.io/s/angry-firefly-s2cm8g?file=/src/App.js

@rcbyr rcbyr closed this as completed Jun 14, 2022
@pySilver
Copy link

@rcbyr thanks for your work. What is the reason behind tweaking touch-actions by default? Is this a mere usability thing?

@kj
Copy link

kj commented Jan 19, 2023

@rcbyr I tried your example in both Firefox for Android and Brave for Android and I couldn't use pinch zoom in either. This is the one thing that's missing for me in this library. The only slider libraries I've found pinch zoom to work with are Swiper and Glider.js (but this one uses native scrolling). I'd love to see this work in Keen-Slider too.

@kj
Copy link

kj commented Jan 19, 2023

I made a PR for this at #312, if it's helpful.

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

4 participants