Closed fobos531 closed 2 years ago
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 (https://github.com/colorfy-software/react-native-modalfy/commit/6c5352b6106e0d16dde40648943f9f88345335fb) 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!
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 repo 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
expo init
)react-native-modalfy
are: react-native-gesture-handler
and react-native-reanimated
.Perform:
yarn
expo start
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 components/IntroButton.tsx
. I have modified the Text
component to use the Layout Animation API introduced in recent version of react-native-reanimated
. I believe this (the entering
and exiting
props on L13) are what's causing your library to bug out. I also tried the layout
prop and observed the same behaviour.
If you try the following:
entering
and exiting
propsI tried reverting this change (re-adding the entering
and exiting
) and by following the above described steps I successfully reproduced the bug 100% of the time.
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 0.65.1
, and it is happening when I have Layout Animation components from reanimated with entering/exiting set up.
@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 v3.1.1
! 🚀
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.