react-native-modalfy icon indicating copy to clipboard operation
react-native-modalfy copied to clipboard

[iOS] open modal when screen has options presentation: "modal"

Open vietanhdtd opened this issue 1 year ago • 4 comments

I have encountered a problem when using a modal on a screen that has the option presentation: "modal". The modal always shows up behind it.

To address this issue, I came up with a workaround that involves wrapping the screen content with ModalProvider. However, this approach results in opening two modals, and I am unable to close the modal on a screen with presentation: "modal".

If anyone has a better solution for this case, please share it with me. Thank you.

vietanhdtd avatar Sep 22 '23 09:09 vietanhdtd

hey @vietanhdtd! could you provide a repro on snack please?

CharlesMangwa avatar Sep 25 '23 09:09 CharlesMangwa

@CharlesMangwa thank you for responding. Here's snake of the problem i mention above:

https://snack.expo.dev/@vietanhdtd/modalfy-screen-presentation-modal

CleanShot 2023-09-25 at 11 54 51

And only happen on iOS.

vietanhdtd avatar Sep 25 '23 16:09 vietanhdtd

hey @vietanhdtd! sorry for the delayed response. unfortunately, i do not have an idea how to address your issue effectively. i'd need to spend some more time trying things before i can potentially release a patch. apologies for the inconvenience.

CharlesMangwa avatar Mar 08 '24 22:03 CharlesMangwa

Hello @CharlesMangwa, I opened a PR #149 which fixes this

fobos531 avatar Jun 28 '24 12:06 fobos531