metafizzy / flickity

:leaves: Touch, responsive, flickable carousels
https://flickity.metafizzy.co
7.53k stars 602 forks source link

Render issue when I use flickity in an overlay (modal) wich is hidden on pageload #797

Closed pixelman closed 6 years ago

pixelman commented 6 years ago

Hi,

I notice a 'render problem' when using flickity in content which is hidden by default. For instance a modal (overlay) or when using tabs, where the 'flickity content' is in the second tab, which is hidden. If you click on that tab it shows al the content, but I need to resize my browser window to render it properly. So it needs a kind of refresh.

It's probably some option I need to activate? Many Thankx Harold.

AdamJaggard commented 6 years ago

If the content is hidden then you need to programatically trigger a resize when the content is shown to tell Flickity to update, see: Sizing and Positioning