willnguyen1312 / zoom-image

A little yet powerful framework agnostic headless library to zoom images on the web
https://willnguyen1312.github.io/zoom-image/
MIT License
292 stars 8 forks source link

useZoomImageMove and disableScrollLock break mobile experience #299

Closed arobbins closed 3 weeks ago

arobbins commented 3 weeks ago

Describe the bug

Hey Nam!

I'm using the useZoomImageMove function from the @zoom-image/react package.

If I do not pass disableScrollLock into the zoom.createZoomImage() function, then the following happens:

I've tried disabling the scroll lock on mobile only, but that makes the experience worse since the user cannot zoom while they move their finger around on their phone.

The best solution I've found is to set disableScrollLock to true only for desktop. But then the mobile experience suffers.

Unfortunately I may have to move to another package as my users keep complaining about the mobile issue, specifically.

Any chance you can get this fixed?

Reproduction

See above

Used Package Manager

npm

Validations

willnguyen1312 commented 3 weeks ago

Hi Andrew, sorry about that and I will take a look at that soon. Meanwhile, can you please provide me a minimal yet complete reproduction code of your user experience? Thanks so much 😊

willnguyen1312 commented 3 weeks ago

I think I'm able to reproduce it on my iPhone. I will shoot a new PR to fix it soon and tag you in for testing 😊

willnguyen1312 commented 3 weeks ago

Sorry, Github automatically closed your issue when I merged the linked PR. Please update the dependency on your end to the latest and test it again. Feel free to reach out if anything comes up 😊

arobbins commented 3 weeks ago

Thanks Nam, this appears to be fixed on my end. Really appreciate the turn around.

Although I think I found another bug. I'll create a new issue for it.

willnguyen1312 commented 3 weeks ago

Thanks a lot Andrew, really appreciate your help to triage and improve the quality of this library :)