dimsemenov / PhotoSwipe

JavaScript image gallery for mobile and desktop, modular, framework independent
http://photoswipe.com
MIT License
24.18k stars 3.31k forks source link

PhotoSwipe blocks the screen when closing image via swipe down #2013

Open carlo-fontanos opened 1 year ago

carlo-fontanos commented 1 year ago

PhotoSwipe Version: 5.3.3 Installtion type: CDN

When closing a image on a Android tablet browsers using swipe down getsture, then I tap on a button on the screen, it takes 2 taps before it actually registers the tap. This issue only happens on Android Tablets running on latest version. It seems PhotoSwipe is not closing properly, like there is a hidden element that is blocking the screen.

I tried the following code, but the issue still persist:

lightbox.on('close', () => {
    $('body').click().focus();
});

Please advice

floogulinc commented 1 year ago

This also happens after swiping between images when trying to hit one of the UI elements within photoswipe itself

dimsemenov commented 1 year ago

Please provide more info:

Thanks!

floogulinc commented 1 year ago

Using the latest Chrome 110 on Android 13 but it has been happening for a long time, even on PhotoSwipe v4 if I remember correctly.

To reproduce on the PhotoSwipe demo page tap one of the images in the gallery and the swipe up or down to close it and then quickly try to tap one of the other images, if the next tap is quick enough it won't open. You can also try swiping to a new slide and quickly try to hit the zoom button and once again within a certain small period of time after the swipe it won't work.

floogulinc commented 1 year ago

Here's a screen recording https://youtu.be/HUHfmsApU40