-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
When a modal is closed, it's hidden rather than removed
When calling ModalController.closeByComponent, the modal window is hidden rather than removed.
Having "leftovers" of a hidden modal window causes issues when using other 3rd party tools, in addition to being a code-smell. In our case, we are using Reakit's menu component when opening a modal window.
Reproduction Steps
- Setup a project with a menu component from Reakit.
- One of the menu items should open a modal window with react-modal-global.
- Open a modal window.
- Close the modal window.
- Try to open a modal window again.
Expected Behavior
The menu items should not disappear.
Additional Context
In the following video, you can see better what I mean
Screen.Recording.2024-04-03.at.14.58.47.mov
What happens when using Reakit's menu component
Screen.Recording.2024-04-03.at.15.00.18.mov
I believe this is what's causing this behaviour. Could you please clarify this was added?
Thank you for your time 🙏
FrameMuse