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

[EuiPopover and EuiComboBox] Has issues ownFocus #1454

Closed
Tracked by #4054
Bargs opened this issue Jan 17, 2019 · 4 comments
Closed
Tracked by #4054

[EuiPopover and EuiComboBox] Has issues ownFocus #1454

Bargs opened this issue Jan 17, 2019 · 4 comments
Labels

Comments

@Bargs
Copy link
Contributor

Bargs commented Jan 17, 2019

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

@jpambrun
Copy link

I have the same issue. Is there any workaround?

@cchaos
Copy link
Contributor

cchaos commented Apr 13, 2020

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.

@myasonik myasonik added the bug label Apr 13, 2020
@thompsongl
Copy link
Contributor

thompsongl commented Apr 13, 2020

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.

@cchaos cchaos changed the title Issues with Popover's ownFocus and ComboBox [EuiPopover and EuiComboBox] Has issues ownFocus Sep 19, 2020
@thompsongl
Copy link
Contributor

thompsongl commented Apr 29, 2022

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
Labels
Projects
None yet
Development

No branches or pull requests

5 participants