PhotoSwipe
PhotoSwipe copied to clipboard
pswp--open keeps opened (not visible) but I cannot click on the screen after closing
If I reload my site and create a new gallery, when opening an image, the pswp--open div remains opened and I cannot interact with the page anymore. I noticed that if I inspected the element and remove the dislpay:block style from the element it works again, what could be the issue?
http://134.209.196.106/photos/animal/african-buffalo
.pswp--open { display: block; }
I am also experiencing this recently. It seems the .pswp--open
class is not being removed from the .pswp
container... But only in these browsers:
- Chrome 77.0.3865.120 (Windows)
- Firefox 69.0.3 (Windows)
Photoswipe v4.1.3 is still working as intended for me in these browsers...
- Edge 44.18362.387.0 (Windows)
- Firefox 69.0.2 (Linux)
- Firefox 68.1.1 (Android)
- Chrome 77.0.3865.116 (Android)
- Chromium 76.0.3809.100 (Linux)
I have implemented my galleries using the pattern outlined here...
Sorry I am unable to test iOS or Mac OS browsers. Hopefully this gives some insight to a possible fix.
So, I'm glad to say this turned out to be an implementation error on my part. I had an extra .gallery
wrapper around the .gallery
element I was initializing from DOM. So after removing this, PhotoSwipe worked as expected. Thanks for the great library by the way.
I have same problem, what happen?
@longshihui I just had the same issue. Like @drvid mentions, you probably have two .pswp
elements in the DOM?
I had the same and then it turned out that I initialise lightbox twice. I removed the latter, and fixed. FYI. I think there is no need to keep this issue open.