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

On a touch enabled device, zoomable images might prevent the possibility to scroll the page #115

Open
seiz opened this issue Nov 10, 2016 · 5 comments

Comments

@seiz
Copy link

seiz commented Nov 10, 2016

Lets say you look at a page with a couple of large images (one below another) on an iPad and all images on the page are zoomable.

If you want to scroll the page, you place your finger on the screen and swipe up.
If you had placed your finger over an image by coincidence and start swiping, you're not initiating a page scroll, but an image zoom (image zooms in and zoomed in state moves).

Does anyone have an idea how we could improve this (i.e. measure the delay between touch down and swipe to figure out the users intent)?

@seiz
Copy link
Author

seiz commented Nov 11, 2016

In the mean time, i solved this like follows:

I call zoom with on:"click", so the zoom gets started by a "click"-event.
Then, in jquery.zoom.js, i made a little change to disable touchstart and touchend, if on is "click", so even on touch devices, one would only start the image zoom when one taps the image and not by swiping (over it) to scroll the page.

Seems to work nicely for my use case.

@tomblanchard
Copy link

Thanks @seiz! This worked perfectly for my use-case also :) U-da-man.

@Rafrobeat
Copy link

Thanks a lot @seiz! This worked perfectly for my case.

@uar-marko
Copy link

uar-marko commented May 21, 2019

Thank you @seiz! worked for me too, is there option to un-zoom on some event. It triggers on touch but I cant get out of zoom afterwards?

@vitormicillo
Copy link

I don't know why, for me doesn't work :-(

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

5 participants