jsor / lity

Lightweight, accessible and responsive lightbox.
https://sorgalla.com/lity/
MIT License
1.16k stars 196 forks source link

Am I seeing double? Duplicate instances of Lity. #209

Closed iversoncreative closed 5 years ago

iversoncreative commented 5 years ago

When opening an image in Lity, I seem to be seeing two instances of the enlarged image. I have to click twice to close it and see the animation twice as well. What might cause this?

Example: https://www.patrickiverson.com/portfolio/lux-writes/

View Source: screen shot 2019-02-15 at 12 45 26 pm

jsor commented 5 years ago

You're probably loading and applying lity twice on the page. I've seen lity is included in both /wp-content/themes/clean2019/dist/scripts/main-6b986a9ffc.js and /wp-content/themes/clean2019/dist/scripts/loadmore.js.

iversoncreative commented 5 years ago

Bingo. I rechecked my build process and in fact was doing this. Fixed that and am no longer seeing double lity. Thank you for takin the time to check it out. Very much appreciated.