-
Notifications
You must be signed in to change notification settings - Fork 48
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
Android open/close modal works only once #66
Comments
Hey @fobos531! Happy to read that Modalfy has been able to help you with your work! The bug you're reporting is a troublesome one indeed! I followed the repro steps you provided but the demo app was behaving as expected, wether it'd be hardware back button, software back button, press on backdrop or close button in modal. I also updated the example project to Expo 44 (6c5352b) and i's working there as well. If you have time to provide a proper repo I could take a look at, that would be very helpful! |
Thank you for the prompt response! I'll try and come back when I succeed in reproducing it again. |
Hey @CharlesMangwa I believe I have a 100% reproducible example which you can find here: https://github.com/fobos531/modalfy-example Summary of the repo
Perform:
Open the app in Expo Go on Android and try to open the first modal from your example app (the one that slides up from the bottom). It should work fine on first open & close. Then, immediately after, the modal should open, but its opacity should be different, like it's overlaid with the backdrop. Try tapping anything, it will result in the modal being dismissed. After you've confirmed this behaviour, go to If you try the following:
I tried reverting this change (re-adding the My test device is a Xiaomi Mi Note 10, with MIUI 12, Android 11 I hope this helps in resolution of this bug. Please let me know if you need anything else. |
Thanks a lot for the detailed steps @fobos531! Will look into this and get back to you. |
Hello! I have same issue on react-native |
@CharlesMangwa It works for me if I switch to render backdrop before (under) Stack Item(s). Is there some reason we have this order? |
Hey @nemanja-sljivic, thanks for looking into this. The order may have been switched indeed. If you can reproduce the issue with the current code and switching the order fixes the bug with no regressions, feel free to open a PR! |
@CharlesMangwa Thanks for fast reply. I really like this package. Amazing work! I made a PR for it, and I hope it works for you as well @fobos531, because it works perfectly for me. |
Hi @nemanja-sljivic! Thanks for the kind words! Also big thank you for the PR: just gave it a shot on the repro app @fobos531 provided and your fix did do the trick indeed! Merging and releasing a new version right now! |
Released in |
Hello, first of all, thanks for this great library, it's really clean and approaches modals in React Native in a nice way. I've been implementing them using this library in my app and everything has went well, until I've noticed that the open/close interaction works only the first time.
What happens is when I try to open the modal every subsequent time, it opens, but it opens in such a way that it seems like the backdrop is overlaying the modal (like it has a higher zIndex), and with that, the modal is completely non actionable.
I cannot reproduce this issue on your example app which has been built with Expo 42, however, it is reproducible on an Expo 44 project.
Steps to reproduce:
expo start
The same behaviour works as intended on iOS. Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: