Add optional scrollContainer option
It should fix the Subsequent animation flickers after scrolling scrollbar manually case from https://github.com/formkit/auto-animate/issues/16.
This issue will remain in the case of https://auto-animate.formkit.com/#plugins.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| auto-animate | ✅ Ready (Inspect) | Visit Preview | Jun 7, 2022 at 0:12AM (UTC) |
Do you reckon it's worth considering nested scroll containers and potentially detecting scroll containers automatically by traversing up the DOM tree?
Thought about it too, but getCoords is used very often and widely e.g. it's called for every animated element on animation interaction, so traversing dynamically to the first available scroll container from the el param is most likely will impact performance, it can get worse if the DOM tree will be quite deep.