motion icon indicating copy to clipboard operation
motion copied to clipboard

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

Open msev opened this issue 1 year ago • 3 comments

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!

msev avatar Nov 14 '24 16:11 msev

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

mattgperry avatar Nov 14 '24 17:11 mattgperry

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

Thanks @mattgperry

msev avatar Nov 14 '24 17:11 msev

In your root layout file make sure you're setting a non-static position (e.g. "relative") to your <html> and <body>

Image

ColstonBod-oy avatar May 24 '25 11:05 ColstonBod-oy