Skip to content

[EuiColorStops] Ensure popover close on outside click#4687

Merged
thompsongl merged 4 commits intoelastic:masterfrom
thompsongl:4679-popover
Apr 6, 2021
Merged

[EuiColorStops] Ensure popover close on outside click#4687
thompsongl merged 4 commits intoelastic:masterfrom
thompsongl:4679-popover

Conversation

@thompsongl
Copy link
Copy Markdown
Contributor

@thompsongl thompsongl commented Apr 5, 2021

Summary

Fixes #4679. Changes to ownFocus in EuiPopover affected the underlying focus trap on outside clicks. Clicking a color stop thumb while the popover was open would disable the underlying focus trap, causing the focus trap to no longer watch for outside clicks. We don't want the EuiColorStopThumb popover trap to be disabled on outside click; instead, we the trap should remain active while the popover is open.

I decided to expand the prop options beyond what we currently need. Can be expanded further in the future if necessary.

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile

  • Checked in Chrome, Safari, Edge, and Firefox
  • Props have proper autodocs and playground toggles

- [ ] Added documentation

  • Checked Code Sandbox works for the any docs examples
  • Added or updated jest tests
  • Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_4687/

Copy link
Copy Markdown
Contributor

@myasonik myasonik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@thompsongl thompsongl merged commit 62426b8 into elastic:master Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EuiColorStops] EuiColorStop Popover won't close if thumb element gets focus

3 participants