Skip to content

Error closing multiples opened modals #23463

@BrodaNoel

Description

@BrodaNoel

🐛 Bug Report

When a Modal A, opens a Modal B, if we close the Modal A, the Modal B is gonna be closed, but the Modal A still there, frozen. (live examples added).
This issue is only happening on iOS. Android is working well.

This issue was reported on Expo repo: expo/expo#3473

To Reproduce

  1. Open https://snack.expo.io/HJQ_fn34N
  2. Open the app in Android (we are gonna see it working well at first)
  3. The App is gonna to open a Red Modal, automatically.
  4. Quickly, Tap on "Show Modal Blue" (so, the Red Modal is gonna open a Blue Modal).
  5. Wait for 10 seconds.
  6. The parent "App" is gonna close the Red Modal. So, Blue modal is gonna be closed as well, due to the Blue Modal is a Red Modal children.

Now, let's see the error on iOS

  1. Open the same Snack
  2. Open the app in iOS
  3. The App is gonna to open a Red Modal, automatically.
  4. Quickly, Tap on "Show Modal Blue" (so, the Red Modal is gonna open a Blue Modal).
  5. Wait for 10 seconds.
  6. The parent "App" is gonna close the Red Modal. But, the Blue Modal is gonna be closed but the Red Modal still there, broken. Kind of froze.

Expected Behavior

The Android behavior (both modals should be closed).

Current Behavior

iOS only close the Blue Modal (the second one) and keeps the Red Modal (the first one) opened.

Code Example

https://snack.expo.io/HJQ_fn34N

Environment

Expo environment

Expo CLI 2.7.0 environment info:
    System:
      OS: macOS 10.14.2
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 9.10.1 - ~/.nvm/versions/node/v9.10.1/bin/node
      Yarn: 1.13.0 - ~/.yarn/bin/yarn
      npm: 6.7.0 - ~/.nvm/versions/node/v9.10.1/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^32.0.0 => 32.0.0
      react: 16.5.0 => 16.5.0
      react-native: https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz => 0.57.1
    npmGlobalPackages:
      expo-cli: 2.7.0

** React Native Environment**

  React Native Environment Info:
    System:
      OS: macOS 10.14.3
      CPU: x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
      Memory: 81.80 MB / 8.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 9.10.1 - ~/.nvm/versions/node/v9.10.1/bin/node
      Yarn: 1.13.0 - ~/.yarn/bin/yarn
      npm: 6.7.0 - ~/.nvm/versions/node/v9.10.1/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        Build Tools: 23.0.1, 23.0.3, 25.0.3, 26.0.1, 27.0.3, 28.0.3
        API Levels: 23, 25, 26, 27, 28
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0
      react-native: https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz => 0.57.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions