-
Notifications
You must be signed in to change notification settings - Fork 841
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
[Discuss][RFC] - Add outside click onClose #5781
Comments
Hey @michaelolo24, a prop already exists called |
Awesome, is this for popovers and modals? Couldn't find it in the docs |
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background
There have been a few cases of bugs within Kibana where certain popovers or flyouts have stayed open when ideally they should have been closed on a click outside of the popover or flyout element. Most of these elements have either some form of an
onClose
orhandleClose
prop which allows use to manually trigger the close. This issue is an RFC to add a boolean flag or something similar to ancloseOnOutsideClick
boolean off to all popovers/modals. This could use the outsideClickDetector internally to the components, but could prove very useful in addressing a class of minor UI bugs such as these.As an aside, when testing the outsideClickDetector https://elastic.github.io/eui/#/utilities/outside-click-detector, I was surprised to find that it also detects clicks on the button itself when enabled, which I would not have expected to be the default behavior
Screen.Recording.2022-04-12.at.9.22.19.AM.mov
The text was updated successfully, but these errors were encountered: