Example scroll position incorrect when useGetBoundingClientRect: true
Hi, I would like first to thank you for the amazing work done here !
I have tried the example provided in the repo, but I soon as I turn on useGetBoundingClientRect option in the init object, scroll position when we scrollTo onFocus are wrong. Any idea on how to fix that ? I need useGetBoundingClientRect as I am using virtualized list (TanStack Virtual).
Any help would be much appreciated,
Thanks !
Thank you four reaching out.
Would you mind to share an example of what you're trying to achieve?
The useGetBoundingClientRect option forces the engine to use the Element.getBoundingClientRect() method (https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect) which gives you the element coordinates relatively to the viewport.
Depending on how you structure your UI it might not be what you want.