What is the expected behavior?
I still didn't use your toolkit
And I asked a question to myself:
Can I open 2 or more overlays: one before another?
And when I'll close one - that overlay which was before those overlay will be still there.
What is motivation or use case for adding/changing the behavior?
My question
Are you willing to work on this yourself?
yes
PS
reakit is great, I love you guys! :-)
Yes, it's possible. Whether it will close all overlays or only the top level one depends on what the user does.
ESC: v0 will close all overlays since the event handler is attached to the document; v1 will close only the dialog which has focus within.
Click outside: will close all dialogs if the click is outside all dialogs; will close only the top level dialog if the click is outside it, but inside the other dialog. Both v0 and v1 works the same. But in v0 you need to set the hideOnClickOutside prop.
Programatically: you can always call overlay.hide().
v0 Overlay playground: https://reakit.io/components/overlay
v1 Dialog playground (alpha): https://next.reakit.io/docs/dialog
Most helpful comment
Yes, it's possible. Whether it will close all overlays or only the top level one depends on what the user does.
ESC:
v0will close all overlays since the event handler is attached to the document;v1will close only the dialog which has focus within.Click outside: will close all dialogs if the click is outside all dialogs; will close only the top level dialog if the click is outside it, but inside the other dialog. Both
v0andv1works the same. But inv0you need to set thehideOnClickOutsideprop.Programatically: you can always call
overlay.hide().