biati-digital / glightbox

Pure Javascript lightbox with mobile support. It can handle images, videos with autoplay, inline content and iframes
MIT License
2.03k stars 228 forks source link

With sliderjs some Glightbox links do not work. #310

Closed gregoirenoyelle closed 2 years ago

gregoirenoyelle commented 2 years ago

Describe the bug I use Glightbox with splide.js on this page.

Are you able to reproduce the bug in the demo site No.

To Reproduce Steps to reproduce the behavior.

  1. Go to this page
  2. Click on the middle image on a slider.
  3. Try to click on the sides images.
  4. On this case the lightbox stop working from time to time.

Expected behavior The click on each thumbnail should open the lightbox. On archive page, it works all the time. It's like there is a conflict with the splide.js .

Screenshots I have made a screencast about the bug. Here is the direct link.

Desktop:

Smartphone:

Thanks a lot for your help.

biati-digital commented 2 years ago

This is not problem with this library or splidejs, you need to execute GLightbox once splide.js has been created completely or depending of how splide works (if it inserts slides dynamically), you might need to reload GLightbox. We can not provide any help with this.

gregoirenoyelle commented 2 years ago

Hi Thanks a lot for your answer. On splide.js I can fire some function on many events. I just want to know the right way to reload GLightbox. Best regards, Grégoire

gregoirenoyelle commented 2 years ago

Hi, that was a priority problem for the 2 scripts. Thanks for your help. Cheers, Grégoire