[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/ |
cchaos
left a comment
There was a problem hiding this comment.
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 |
chandlerprall
left a comment
There was a problem hiding this comment.
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
EuiSelectablewas 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
rootIdin theEuiSelectable.Checklist
- [ ] Props have proper autodocs and playground toggles- [ ] Added documentation