motiondivision / motion

A modern animation library for React and JavaScript
https://motion.dev
MIT License
25.66k stars 842 forks source link

[QUESTION] Please ensure that the container has a non-static position... #2880

Open msev opened 1 week ago

msev commented 1 week ago

Hi @mattgperry

I have the following message in the console :

Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.

The container is thehtml element, is this also true for this element, or can I ignore the warning?

Thanks!

mattgperry commented 1 week ago

Could you spin this up in a codesandbox? It helps me investigate and write a test against it

msev commented 1 week ago

Here is the link: https://codesandbox.io/p/sandbox/95ttr2

Thanks @mattgperry