-
Notifications
You must be signed in to change notification settings - Fork 839
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
[EuiDataGrid] When a cell expansion popover is closed, ensure focus is always returned to the originating cell for keyboard users #5761
Conversation
24cc559
to
efaf0be
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_5761/ |
2836072
to
9b007ae
Compare
9b007ae
to
44d3016
Compare
Tested and confirmed that the last 2 added Cypress tests fail on main but pass on this branch. |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5761/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I had one suggestion in the Cypress spec about using a Real Events method. If it makes sense to switch, let's do that, or if it's better as is, that's great too!
cy.realMount(<EuiDataGrid {...baseProps} />); | ||
cy.get( | ||
'[data-gridcell-row-index="0"][data-gridcell-column-index="0"]' | ||
).click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about swapping these .click()
events for .realClick()
ones? https://github.com/dmtrKovalenko/cypress-real-events#cyrealclick
If that causes issues for clicks that need a { force: true }
object, I'm okay sticking with the current implementation.
Ooo, it looks like |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5761/ |
Summary
This PR closes #5646 by manually returning
.focus()
to the originating cell when a popover is closed by keyboard users (the escape key or the F2 key). This applies to two separate buggy use cases:Before
After
Checklist
- [ ] Checked in both light and dark modes- [ ] Checked in mobile- [ ] Props have proper autodocs and playground toggles- [ ] Added documentation- [ ] Checked Code Sandbox works for any docs examples- [ ] Checked for breaking changes and labeled appropriately- [ ] Updated the Figma library counterpart