noelboss / featherlight

Featherlight is a very lightweight jQuery lightbox plugin. It's simple yet flexible and easy to use. Featherlight has minimal css and uses no inline styles, everything is name-spaced, it's completely customizable via config object and offers image, ajax and iframe support out of the box. Featherlights small footprint weights about 4kB – in total.
https://www.noevu.ch/featherlight-js-the-ultra-slim-lightbox/
MIT License
2.07k stars 296 forks source link

Empty modal before iframe loads #363

Open bradhogan opened 6 years ago

bradhogan commented 6 years ago

Bug report - you can view the issue here: http://jsfiddle.net/bradhogan1983/sxwge12m/

When using the iframe option and clicking a link to open the modal, the modal opens instantly, but the iframe takes a second to load and while loading the modal container is just a small empty box. This happens on your demo as well as my local dev site. I'll also attach a screenshot of what I'm seeing on my dev site.

Thanks!

screen shot 2018-06-12 at 2 46 13 pm
alanef commented 5 years ago

Is there any workaround like a 'loading' spinner?

marcandre commented 5 years ago

Featherlight support spinners (check the doc). You can also specify a width and height for the iframe.

Please let me know what else Featherlight should/could be doing...

alanef commented 5 years ago

Hi Marc,

Specifying the width and height doesn't apply during the few seconds while the iframe is connecting.

But I did find data-featherlight-loading='any html can go here' which I'm guessing is the support for spinners? By using the appropriate html including spinning gifs as required and divs of whatever size the small white box described above can be altered as required.

It is a great library, thank you for building it.