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

[BUG] useScroll target does not account for CSS translate #2914

Open
tommhuth opened this issue Nov 28, 2024 · 0 comments
Open

[BUG] useScroll target does not account for CSS translate #2914

tommhuth opened this issue Nov 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@tommhuth
Copy link

2. Describe the bug

When target element for useScroll uses translate, the translate is not taken into account when calculating target position. Can't see anything in the docs that should give me the impression that is impossible?

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
(un)comment the translate and the scroll progress is the same, even tho element is closer to screen center:

https://codesandbox.io/p/devbox/hczfww

4. Steps to reproduce

Steps to reproduce the behavior:

  1. see 2.

5. Expected behavior

A clear and concise description of what you expected to happen.

7. Environment details

Nextjs

@tommhuth tommhuth added the bug Something isn't working label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant