Skip to content

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

Description

@andreadelrio

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

Activity

  1. cchaos commented on Oct 15, 2020

    @cchaos
    Contributor

    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

  2. added
    dependencies
    on Oct 16, 2020
  3. Dosant commented on Feb 24, 2021

    @Dosant
    Contributor

    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

  4. reopened this on Feb 24, 2021
  5. thompsongl commented on Aug 31, 2021

    @thompsongl
    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.

  6. self-assigned this
    on Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

dependencies

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions