GSTJ / react-native-magic-modal

🦄 A modal library that can be called imperatively from anywhere!
https://github.com/GSTJ/react-native-magic-modal
MIT License
207 stars 8 forks source link

Modal is not displayed on Android #119

Open mkloouo opened 4 hours ago

mkloouo commented 4 hours ago

Describe the bug Android emulator device does not show the modal at all.

To Reproduce Steps to reproduce the behavior:

  1. Generate react-native@0.75.3 project
  2. Add react-native-magic-modal + peer deps (react-native-reanimated@~3.15.0 and react-native-gesture-handler@~2.18.1)
  3. Configure portal etc
  4. Show view with set width and height and set white BG to make sure to see some kind of modal
  5. See it on iOS Simulator/real device
  6. Do not see it on the Android device

Expected behavior See the modal on the Android device

Screen capture

test on iOS test on android.webm

Smartphone (please complete the following information):

Additional context I tried figuring out and it seems from the logs that everything renders, just does not appear on the screen. Changing zIndex to 1 on the surrounding View in index.cjs seems to fix the issue, but that's not a solution, just a hint where to look

zindex 1 android.webm

GSTJ commented 3 hours ago

I've created a branch with the same dependencies you mentioned, but I was not able to repro the issue:

https://github.com/user-attachments/assets/1c86a3b4-a701-41b3-832d-d19e79efb8de

Branch: chore/reproduce-issue

Can you try it on my branch? I would appreciate a branch that I can clone so that I can see this in action before following up with a fix.

The only thing I did not do was bump react-native. I wonder if this has something to do with the new arch being enabled by default. I'm following Expo here.