-
Notifications
You must be signed in to change notification settings - Fork 842
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
[EuiSelectable] Fix logic to detect the blur event coming from child popover #5021
[EuiSelectable] Fix logic to detect the blur event coming from child popover #5021
Conversation
ddb3d9f
to
eaab94c
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_5021/ |
🤔 It's hard to do any keyboard or screen reader usage as, apparently, this has become totally broken at some point and using arrow keys and enter to use this component doesn't work at all. The code change looks fine (the bug is in master so it's definitely not related) but it makes me uncertain on how to really test this thoroughly... |
Weird, I just checked out published docs, and I have no trouble using the keyboard to navigate. Screen.Recording.2021-08-12.at.11.50.52.AM.mp4 |
Ugh, ignore me. This is an old problem of mine that I keep forgetting about - has bit me several times. For whatever reason, my external keyboard (and no one else's) does this. As soon as I use any other keyboard it's all fine. Code looks good; Tested in FF and Edge. Can be approved after checklist is completed. |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5021/ |
…nContainerBlur-activeOptionIndex-conflict
Preview documentation changes for this PR: https://eui.elastic.co/pr_5021/ |
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.
Functionally tests right to me. @chandlerprall can you double-check the code?
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Preview documentation changes for this PR: https://eui.elastic.co/pr_5021/ |
Just noting that that we should look at backporting this once it merges |
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.
Change LGTM; Tested via the test deployment
Preview documentation changes for this PR: https://eui.elastic.co/pr_5021/ |
Summary
Resolves #5020 (and probably #4147).
The current logic to detect if
EuiSelectable
was losing focus due to its popover was not working. Probably because the HTMLElement didn't actually contain the popover.This PR changes the logic to check the popover's List ID to match the assigned
rootId
in theEuiSelectable
.Checklist
- [ ] Props have proper autodocs and playground toggles- [ ] Added documentation