Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example scroll position incorrect when useGetBoundingClientRect: true #128

Open
gsdev01 opened this issue Apr 22, 2024 · 1 comment
Open
Labels
question Further information is requested

Comments

@gsdev01
Copy link

gsdev01 commented Apr 22, 2024

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 !

@xavi160
Copy link
Contributor

xavi160 commented May 10, 2024

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.

@xavi160 xavi160 added the question Further information is requested label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants