jlmakes / scrollreveal

Animate elements as they scroll into view.
https://scrollrevealjs.org/
22.39k stars 2.26k forks source link

When using sync() all previously loaded items disappear #468

Closed modestasu closed 6 years ago

modestasu commented 6 years ago

Hey!

Firs of all great work, I love this plugin and it was such an easy setup so for.

However, I've noticed a strange behaviour when using .sync() items that were previously loaded and were visible disappear and only the ones in viewport show. Here's a quick screencast of what I mean - https://screencast-o-matic.com/watch/cF6bc1YUBW

And here's a JSbin test - https://jsbin.com/miguyoxiqo/edit?html,output

Is this a normal behaviour? Am I missing something obvious here?

My goal is to update and reload only specific sections on a website homepage while keeping the rest intact. I thought calling .sync() would work this way.

jlmakes commented 6 years ago

Thanks for sharing this @modestasu, it's definitely a bug!

ZNS commented 6 years ago

Also ran into this. Is it possible to downgrade to a version that works for now?

jlmakes commented 6 years ago

I'm not sure, but a new release is coming soon @ZNS

ZNS commented 6 years ago

Alright, sounds good. {reset: true} works as a workaround for now but it's not the behavior I want

jlmakes commented 6 years ago

I have some trouble using the library with the same behavior as mentioned above...

Your situation seems directly related to your use of 3rd party scripts @alexgil1994. If you're still having problems, please open a new issue (either here, or with the 3rd party)... ~but the bug in this issue has been identified, and will be fixed soon.~

This bug was fixed in v4.0.5