Skip to content

fix: #10182 fixed the table keyboard navigation in the scrollIntoViewport #10211

Open
jsmitrah wants to merge 11 commits into
adobe:mainfrom
jsmitrah:bug-fix/10182/table-keyboard-navigation-in-scrollIntoViewport-componen
Open

fix: #10182 fixed the table keyboard navigation in the scrollIntoViewport #10211
jsmitrah wants to merge 11 commits into
adobe:mainfrom
jsmitrah:bug-fix/10182/table-keyboard-navigation-in-scrollIntoViewport-componen

Conversation

@jsmitrah

@jsmitrah jsmitrah commented Jun 16, 2026

Copy link
Copy Markdown

Closes #10182

✅ 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 that 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:

  • I have updated the keyboard navigation for the table in the scrollIntoViewPort
  • Previously, when focusing on the table and pressing up on the keyboard, it jumped to the middle of the table column, but after fixing that, it moved to the table header.

🧢 Your Project:

@jsmitrah jsmitrah changed the title chore: fixed the table keyboard navigation in the scrollIntoViewport #10182 chore: #10182 fixed the table keyboard navigation in the scrollIntoViewport Jun 16, 2026
@jsmitrah jsmitrah changed the title chore: #10182 fixed the table keyboard navigation in the scrollIntoViewport fix: #10182 fixed the table keyboard navigation in the scrollIntoViewport Jun 16, 2026
let shouldCenter = true;
if (containingElement) {
const containerRect = containingElement.getBoundingClientRect();
if (containerRect.height > window.innerHeight) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please see #10182 (comment). We shouldn't skip merely based on dimensions.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks @nwidynski, I have updated my code to handle scrolling based on dimensions.

@jsmitrah jsmitrah requested a review from nwidynski June 17, 2026 06:56
@jsmitrah

jsmitrah commented Jun 19, 2026

Copy link
Copy Markdown
Author

Hi @nwidynski , can you please check my PR and let me know if any changes are needed.

@nwidynski

Copy link
Copy Markdown
Contributor

The problem I mentioned in the last comment is still unaddressed. The container may be obscured by another scrollParent, so directly comparing its bounding rect against the viewport doesn't work reliably.

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.

Scroll into view with sticky elements and page scrolling can cause bad-large jumps

2 participants