Open abdi-saeed opened 7 years ago
Try setting setHeights
to false.
Where should this option be set? on $.scrollify()
or $.scrollify.destroy()
???? To be clear, this issue am experiencing (where scrollify is killed for small screens and scroll is back to normal but the height changes momentarily to auto and goes back full page) ONLY happens when am resizing the window. On page reload, things work as expected.
I'm also getting this same experience. On resize and below a certain width destroy() does not fire
In my case, destroy DOES fire and sets height of the slides to "auto", but then something else intervenes and redoes the height calculation.
If you start scrollify like this: $.scrollify({ section: ".lm-page .lm-page__slide", setHeights: false }) then heights won't be set (but you have to set them in your own CSS with vh units, for example. In this case it all works.
But I still think there's a bug where destroy does set the height of the slides to "auto", but then some other function gets called and sets them again.
The goal: small/mobile breakpoint, I would like to destroy scrollify. On wide screen/desktop, I would like to . use scrollify functionality.
Issue: On "mobile", scrollify is destroyed (normal scroll behaviour). But the height initially is changed to auto then very quickly to the viewport height. Am not sure what's forcing this. I have tried to simplify the code as much as possible and used native JS instead of EnquireJS I was using initially.