useZoomImageMove and disableScrollLock break mobile experience
arobbins opened this issue · comments
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:
- The zoom works as expected on desktop, but prevents user from scrolling until they move cursor off image. I want the user to be able to continue scrolling—even if they're currently zooming.
- On mobile, the zoom will sometimes work but then often times lock the entire scroll functionality—even after the user stops zooming.
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
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is available
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 😊
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 😊
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 😊
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.
Thanks a lot Andrew, really appreciate your help to triage and improve the quality of this library :)