Skip to content

[Zoom] Weird behavior when zooming out by pinching the image #380

@bojandurmic

Description

@bojandurmic

Describe the bug

Hi there, thank you so much for making this library.

I've experienced a weird issue when using YARL's Zoom plugin on mobile device and using the pinch gesture to zoom in and out. Zooming in works good, but there is a bug when zooming out.

If you zoom out by pinching fast, the image would zoom all the way out before very slightly zooming in. This prevents my user from swiping left and right. You then need to try pinching in and out again (and you could still experience the bug!) or using the double tap gesture to zoom out all the way.

Expected behavior

I would appreciate if the zooming out pinch gesture was more reliable. Unfortunately, I'm not experienced in building lightboxes or other swipe based UIs, so I'm not sure how libraries like Fancybox or PhotoSwipe do this, but they do not seem to have the same issue.

How to reproduce

Open the Zoom plugin demo page using a mobile device (I've tested on an iPhone). The bug can be reliably reproduced on the second image (the beach house thing with the plane flying over it).

Screenshots / Logs

I have uploaded a video here that explains what I'm facing: https://www.youtube.com/shorts/dSCi3mOaacM

Additional context

If you know a workaround or anything that we can do to fix it, I'd really appreciate it. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions