-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
ios: cannot dismiss Modal #32329
Comments
Having the same problem. |
Yep, facing the same issue. I am on react-native version |
replaced all the |
I just encountered this on an upgrade from In this case it's even more insidious since the modal is set as An experimental attempt to pass through a However, When in the simulator AND debugging (w/chrome; flipper is not enabled in my project) is active, the Modal dismisses properly. |
I had similar issue, but I'm using I'm having this issue in both debug and release, though. Happens on iOS 15 Simulator (debug), iPhone 12 mini (release) and iPhone 6S (release). I didn't try debugging with Chrome because it causes my app to instantly crash and I have to reinstall it to even disable debugger 😅 But it's possible it's some kind of race condition, as Chrome decreases performance (I think). |
I had a similar issue. Also, I was upgrading from 0.64.2 to 0.66.0. |
+1 screen freezes after modal dismissing |
I have a similar issue. My screen didn't turn black, but the entire app becomes unresponsive. Upgraded from RN 0.64.2 to 0.66, literally no other packages changed. Unable to reproduce on Android. iOS only. I tried out the Modal component as part of the React Native standard library, also react-native-modal and react-native-paper's modal - they all had this same behaviour. I believe they are all wrapped versions of Modal from RN? |
+1 app freezes on modal close and in some other libraries. |
Same here. Upgraded to RN66 and since than we had freezing with With |
A workaround that I dislike but that seems to fix the issue for me is to mount/unmount the modal instead of using the
|
Same issue happened with me after upgrading to RN 0.66, react-native-picker-select library (which uses Modal under the hood) freezes the whole app. |
Have the same issue using @react-navigation/stack. When we navigate to next stack screen and then go back, a transparent "view" blocks any interaction. |
Having the same issue with Modals. After a modal is closed, the rest of the app becomes unresponsive and needs to be closed and reopened. |
I tried a number of things, including one of the solutions mentioned above about re-rendering the modal when visibility changes, but that doesn't do anything for me. I have confirmed, using the Xcode debugger, that the view becomes unresponsive after closing the modal because I also went through my commit history to see if maybe I had messed something up, but I see no indication of that. Oddly enough, it seems like this issue has existed for me for a while but I did not notice it until now. I have confirmed that this exists only on iOS. Android seems to be doing fine. |
Another update -- Here's what I ended up doing:
This seemed to work, though I'm not sure why wrapping it with a View with flex: 1 is needed 🤔 I also then noticed that if I have multiple modals on the same page, this issue is only fixed for the first one (likely because of the
That way the modals are only rendered when visible, and there's only 1 modal on a page at a time. This has solved my issue for now, but I wish I didn't have to do all this. Really hoping this issue is looked into. |
Adding View parent with flex: 1, fixed my issue. Thanks man. 👍 Also Avoid using Spinner Libraries, use ActivityIndicator instead, clean your code like unused codes and search for alternative libraries. I hope this bug will be fixed in next versions. |
You save my day, thank you man |
Yes, I'm having this as well, I wasn't sure if it was related, because the I was trying to debug it in Xcode and it seems that there is logic which destroys that (cc: @dotansimha) |
I can confirm this is exactly the issue we're having. And if Flipper is not the active debugger it works fine, |
I just tested it without Flipper (just removed it from the Podfile, run |
I see, it seems inconsistent actually, at least for me. One thing is sure: When you open DevTool and debug in Chrome, it works well, right? |
Chrome debugging doesn't work for me, so I'm unable to check, unfortunately. I'm unable to get into the app when the debugger is enabled, I need to reinstall the app to use it again. |
confirming this on RN 0.65.1 |
Same here! |
|
any solution for |
@rodgomesc You can try this patch that contributor of |
@effektsvk thanks for the quick feedback, |
No problem, make sure you |
yeah, i'm sure that is no cache, i cleared pod caches and installed again, and checked the updated code inside Xcode before start the build process the issue was opened because a user reported
but other users commented
what is exactly my problem, you know if this two things are directly related? |
Well, I had two issues:
You can check for both of those things using Xcode's |
@effektsvk yeah, i checked with the debug view hierarchy and it's exactly |
Interesting, well, unfortunately I don't know how to help you 😕 you can try to ask if there's something else you can do in the issue with the workaround (software-mansion/react-native-reanimated#2244) |
well, passing |
You guys can try by going to the file Pods/Development Pods/React-Core/Default/Views/RCTModalHostView and inside the method dismissModalViewController, add the following lines: |
|
Thank you so much 🔥 I had this problem with |
issue still exists with react-native:
any ideas why this is happening.
edited |
Ohhh man!!! you saved the day. Thanks alot. |
Upgrading react-native-reanimated from 2.3.0-beta.2 to 2.3.0-beta.4 resolved the issue for me. |
i'm not using |
Still an issue on "react-native-reanimated": "2.2.4" and "react-native": "0.66.3" |
This worked for me initially but It has some issues when trying to open another modal again after closing this one. :( I also tried this with "react-native-reanimated": "2.2.4" and "react-native": "0.66.3" . Issue still persists on my end. |
@chris-cornell Check your .lock file -- it might have been pulled as a transitive dependency. I don't use it too, but |
@chris-cornell Even easier way to check it is |
Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
When modal is dismissed the whole screen turns black. see video
React Native version:
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
RCTModalHostViewController is what's blocking the screen
![Screenshot 2021-10-04 at 6 54 47 pm](https://user-images.githubusercontent.com/23050213/135859216-b7dc6524-00a4-4656-93da-608c0c837723.jpg)
.
The text was updated successfully, but these errors were encountered: