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

EUICodeEditor doesn't prevent focus trap via hint overlay if you've made edits #3819

Closed
poffdeluxe opened this issue Jul 29, 2020 · 3 comments · Fixed by #3833
Closed

EUICodeEditor doesn't prevent focus trap via hint overlay if you've made edits #3819

poffdeluxe opened this issue Jul 29, 2020 · 3 comments · Fixed by #3833
Assignees

Comments

@poffdeluxe
Copy link

I was trying out the EUICodeEditor on the demo page and noticed that when I hit escape before making edits, I get the "When you're done press, press Escape to stop editing" overlay on the editor. But after making edits, hitting escape doesn't seem to do anything.

Repro steps

  1. Load up https://elastic.github.io/eui/#/forms/code-editor and put focus on the editor
  2. Hit escape (should bring up overlay)
  3. Click on the overlay to return focus and type whatever you want
  4. Try to hit escape again

Expected Behavior
The hint overlay appears

Actual Behavior
Focus stays on the editor and nothing happens

@thompsongl
Copy link
Contributor

So this appears to only be an issue with the EUI docs site, luckily.

EuiCodeEditor instances on Kibana master work correctly with esc.

Unsure of the actual cause at this point

@thompsongl
Copy link
Contributor

thompsongl commented Jul 29, 2020

Update: It's not just EUI docs, but occurs with a specific config that happens to appear in the EUI docs (enableLiveAutocompletion: true)
So this is a bug, but not one that (by chance) affects Kibana

@timroes
Copy link
Contributor

timroes commented Jul 30, 2020

Just as a side note: please also see #3807 before adding EuiCodeEditor into any new places, since it's not recommended to use it anymore.

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

Successfully merging a pull request may close this issue.

3 participants