-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
When a modal is closed, it's hidden rather than removed #258
Comments
Is this maybe related to #87? |
This is intended behavior, the purpose of it to preserve the state and be able to run animation and transitions. I haven't had problems with this implementation yet, thanks for pointing out! |
This behavior won't be changed, but rather given an option to disable it and also it will be changed when new React Offscreen API comes in. I will work on #87 on the weekend (probably saturday), hopefully this is not too long for you, optionally you could work on this feature yourself and create a PR. I will improve the issue description. |
Also @oddsson I'm looking at your video with "Reakit's menu component" and I can't really understand how the behavior of the modal may cause this issue, do you have any ideas? Can you provide a reproduction example? (https://stackblitz.com/edit/react-modal-global) |
From what I saw in Reakit examples - https://reakit.io/docs/menu/ |
Yea, you're probably right, this seems to be common practice in React. I apologise if this came off as rude. |
Yes! But I wont be able to get around to it until Saturday.. |
I tried to reproduce the issue in a CodeSandbox but was unable to do so, i.e. the menu items did not disappear there like they do in our project. This indicates that there's something wrong on our end. Closing this issue, thanks for your time :) |
@oddsson Yep, thanks for reaching out, I was pretty that this wasn't related to this package since I'm using it constantly and haven't noticed any conflicts so far. |
Hi! I really really need this feature, how can i help you to make it happen? |
@dientuki You can go on and create a PR to show how would you do that, or sketch up an interface. Recently I also noticed in needing this to be optional... |
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
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 🙏☺️
The text was updated successfully, but these errors were encountered: