banthagroup / fslightbox

An easy to use vanilla JavaScript plug-in without production dependencies for displaying images, videos, or, through custom sources, anything you want in a clean overlying box.
MIT License
351 stars 30 forks source link

Pinch to zoom causes issues on mobile #208

Open ibrahim-gabr opened 1 year ago

ibrahim-gabr commented 1 year ago

Expected behavior

On mobile, I expected to be able to pinch an image to zoom in, pan around, and pinch to zoom back out to default size.

Actual behavior

It can cause unexpected behavior like swiping images or more than one image being displayed. you can check the scenario on this store https://amyal-store.com/DKVbyl

How to reproduce

pinch zoom in then pinch zoom out two images will appear and issues with swiping

this is fixed in fslightbox react package here https://github.com/banthagroup/fslightbox-react/pull/147