ActionSheetIOS / Alert appear behind Modal

#1

Hello,

When I have a Modal open and make calls to Alert or ActionSheetIOS, nothing appears until I close the modal. Then they will appear. It seems that maybe they are appearing behind the Modal.

This seems to only be an issue in iOS (Android works ok). I have also tested this in plain React Native (not with Expo) and I do NOT see the issue.

How can I get the Alert / ActionSheetIOS to appear when a Modal is open?

Snack below:

https://snack.expo.io/HJIyUi65f

Thank you.

3 Likes
ImagePicker launchImageLibraryAsync does not float on Modal
#2

This was working for me correctly until the last expo Client update…

1 Like
#3

Hey guys,

Can either of you create a minimal repro case for this using Snack? That will help us with the debugging process greatly.

Thanks,

Adam

#4

Hey,

try this:

First Alert or ActionSheet opened in modal is shown only after closing modal window.

1 Like
#5

The expo camera also appears behind the modal. (react-native-modal)

#6

I’ve just noticed the same Error on my app :sweat:

#7

Is it only appearing in the last Expo client ? If i build my app, would be it still be like this ?
I haven’t changed my app to Expo SDK 16 nor react-native 0.54 and now i have this issue.

#8

This is definitely odd. @ericmorgan1 when i am testing your snack on ios, the first click on action sheet creates it behind the modal, and the second click creates it in front.

#9

How about using this modal instead: https://github.com/react-native-community/react-native-modal . Does it have the same errors on ios?

#10

Hey @quinlanj
—-
Edit: sorry, I misread that. I have not tried that modal, but I will try it.

What I meant was that this action sheet has the same issue:

#11

@llecocq Yes, this problem is after updating to the last version of Expo client. It is not the problem of EXPO SDK 26

1 Like
#12

@quinlanj I’ve just tried the modal that you’ve posted here and it has the same errors

#13

Same problem has opening WebBrowser.openBrowserAsync() in the modal window.

#14

Even with FilePicker / PicturePicker

#15

I’m having this issue as well, alerts and actionsheet is showing up behind my modals on the first try. After that, they appear correctly.

After the modal is closed, that first alert/actionsheet lingers on the screen.

I had an old version of Expo on my ipad and this issue was not occurring. After updating to the latest, the issue popped up again.

This is definitely related to the app on iOS. I’m seeing the issue on my ipad, iphone and xcode simulator.

I am not seeing this issue on android, via genymotion.

Even the latest update on the iOS store, 2.4.7 (12hours before this comment), has this issue still.

Just to reiterate, my build was always the same and I was testing a published expo app. Using that same exact published app, I had the issue on the latest version of the iOS expo app on devices and simulators.

1 Like
#16

similar issue here: ImagePicker launchImageLibraryAsync does not float on Modal

#17

@adamjnav / @quinlanj / @notbrent

Would it be better to add this as an issue on Github?

#18

Hello Expo Team,
Is there any one working on this problem?
Any ETA on when the fix would be available?

thanks in advance for a great product!

#19

Hi people!

You can use the Expo Modal API instead of the React Native one, like this: https://snack.expo.io/ByEqo7Bif

I’ll work on getting some documentation up shortly. The main differences between the react-native Modal API and this are:

  • you need to use ModalHost at the root of your app, like a Provider. you should also ideally put it inside of any Providers so it has the same context available
  • only the context that is available to the ModalHost is available to Modal
3 Likes
#20

I created one earlier here, if you wanna keep up with it: https://github.com/expo/expo/issues/1616

1 Like