Skip to content

EuiSelectableTemplateSitewide requires 2 clicks to trigger onChange events #5020

Closed

Description

@afharo

We noticed in Kibana (elastic/kibana#98851) that the component EuiSelectableTemplateSitewide sometimes requires 2 clicks to trigger the onChange events.

I'm able to reproduce this error in Chrome and Safari, but it works as expected on Firefox.

The issue:

  1. Search any term that brings more than 7 items, so you need to scroll
  2. Scroll down and click on any item from the 7th position onwards
  3. Notice that the list goes back to the top, and still claims that the active item is the first one (not checked though).
  4. Try again, and notice that it now selects the expected item.

not-ok

I think that it must be related to some initial wrong state because, if you click any of the initially-visible items and then scroll to the intended item, it works as expected.
successful

Activity

  1. afharo commented on Aug 12, 2021

    @afharo
    MemberAuthor

    It looks like there was a fix for it in #4152. But it's no longer working on Chrome and Safari.

    I managed to stop the issue from happening by not setting activeOptionIndex: undefined, in this event handler.

    @elastic/elastic-ui and @elastic/eui-design, do you think we can stop setting this value at this given point?

    cc @myasonik as he applied the fix and may have some insights

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions