-
Notifications
You must be signed in to change notification settings - Fork 47
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
[FEATURE] Nested Layer onOutsideClick enabled by option #63
Comments
Hi @ch1ll0ut1 ! Have you solved this? |
I found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I am using react-laag for several nested layers in a rich text editor.
First overlayer is a hovering menu above selected text or another menu for custom rich content.
All menus have buttons that can either perform action or open popover/layers on top of that (positioned relative to the clicked button).
Everything works great, react-laag is amazing for this kind of custom menus and overlays.
There is only one tiny problem now, the first layer can be persistent as long as the cursor is in the content. And layer children´s "onOutsideClick" is ignored and so they dont close when the user clicks around the app. Which I found out is currently intentionally done when a child layer has a parent.
Describe the solution you'd like
Add a option to useLayer to disable the ignoring of onOutsideClick events, so that child layers call as expected onOutsideClick
(If it would be me I would make that the default behaviour as well, since it appears at first to be a bug and requires a careful read through of the documentation to find out that this is the intended behaviour.)
The text was updated successfully, but these errors were encountered: