Skip to content

[EuiPopover and EuiComboBox] Has issues ownFocus #1454

Closed

Description

@Bargs

When ComboBox is the first focusable element in a popover with the ownFocus prop enabled you'll see the ComboBox and Popover flash briefly in the wrong spot before the popover opens completely. Also, sometimes the ComboBox won't open at all. You can see both of these issues in the gif below:

popoverownfocus

Activity

  1. jpambrun commented on Apr 13, 2020

    @jpambrun

    I have the same issue. Is there any workaround?

  2. cchaos commented on Apr 13, 2020

    @cchaos
    Contributor

    There doesn't seem to be one at the moment except for perhaps turning off ownFocus or by making the combobox not the first focusable element in popover.

  3. thompsongl commented on Apr 13, 2020

    @thompsongl
    Contributor

    The case specifically shown in the gif was recently fixed in Kibana: elastic/kibana#56222

    The solution was to use the initialFocus prop on EuiPopover to target one of the header elements for focus.

    To prevent this error at the EUI level, I think we'd be looking at altering animation logic or introducing render delays for popover content.

  4. changed the title [-]Issues with Popover's ownFocus and ComboBox[/-] [+][EuiPopover and EuiComboBox] Has issues `ownFocus`[/+] on Sep 19, 2020
  5. thompsongl commented on Apr 29, 2022

    @thompsongl
    Contributor

    I can no longer reproduce this bug.

    Screen.Recording.2022-04-29.at.1.12.31.PM.mov

    It's likely this was fixed by the move to react-focus-on from react-focus-lock or one of the version updates we made to react-focus-on.
    Additionally, ownFocus no longer focuses the first focusable element by default (#5784), so this outcome is significantly less likely to happen even if my repro is misleading.

    Closing, but anyone can reopen if the problem has not been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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