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

[EuiSelectable] Sometimes needs double click when used inside EuiPopover #4147

Closed
andreadelrio opened this issue Oct 15, 2020 · 3 comments · Fixed by #4152 or #5117
Closed

[EuiSelectable] Sometimes needs double click when used inside EuiPopover #4147

andreadelrio opened this issue Oct 15, 2020 · 3 comments · Fixed by #4152 or #5117
Assignees
Labels
bug dependencies Pull requests that update a dependency file

Comments

@andreadelrio
Copy link
Contributor

andreadelrio commented Oct 15, 2020

When using EuiSelectable inside EuiPopover, sometimes clicking to make a new selection doesn't work at the first click and the user needs to click a second time for the selection to happen. On the first click the focus goes to the currently selected item instead. This happens when there is scrolling occurring inside EuiSelectable.

1Screen Recording 2020-10-15 at 2 43 36 PM

This is currently happening in Discover and Lens as reported here

@cchaos
Copy link
Contributor

cchaos commented Oct 15, 2020

This is similar to #4128 and has do with the fact that the list is holding on to the focus of that first item. So when the list is then clicked initially it's just setting the focus on the list not the highlighted item. I think this may be a regression from the update to virtualized-window.

@myasonik Can you take a look? It's reproducible/happens in the Searchable example. https://elastic.github.io/eui/#/forms/selectable#searchable

@Dosant
Copy link
Contributor

Dosant commented Feb 24, 2021

It looks like this wasn't completely fixed
Bug is reproduced in Kibana in 7.11.1 and master. A bit different steps to reproduce it now:

bug_1.mov
  1. Long list of index patterns and make sure the last index pattern is selected
  2. Open popover
  3. Click on the first one
  4. Didn't work because of the focus

cc @myasonik

@thompsongl
Copy link
Contributor

Looks like this is still an issue, and doesn't actually have anything to do with EuiPopover. Can be reproduced in the docs with a single selection EuiSelectable:

Kapture.2021-08-31.at.09.59.54.mp4

Something with initial focus logic prevents the first click from action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file
Projects
None yet
4 participants