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

fix: offset calculation to handle transformed elements with translateY or translateX in scrollIntoView #7717

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

piecyk
Copy link
Contributor

@piecyk piecyk commented Feb 4, 2025

Closes #7716

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

Copy link

@hshoja hshoja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, tested with tanstack virtuliazer and gridlist from react aria 👍🏼

@reidbarber
Copy link
Member

Thanks for the PR! Is there an existing story we can test this with? If not, could you create a new one?

@piecyk
Copy link
Contributor Author

piecyk commented Feb 6, 2025

Thanks for the PR! Is there an existing story we can test this with? If not, could you create a new one?

@reidbarber I couldn't find an existing story that demonstrates this issue, so I created a simple example with reproducible steps. Please check it out https://stackblitz.com/edit/vitejs-vite-zmdnq3jq.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect offset calculation for elements positioned with transform: translate() in scrollIntoView
3 participants