Skip to content

Modal component does not support SafeAreaView bottom margin #18177

@LutherBaker

Description

@LutherBaker

SafeAreaView bottom margin is not honored inside of a Modal on an iPhone X.

Environment

Environment:
OS: macOS Sierra 10.12.6
Node: 9.7.1
Yarn: 1.5.1
npm: 5.6.0
Watchman: 4.7.0
Xcode: Xcode 9.1 Build version 9B55
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.53.3 => 0.53.3

Expected Behavior

On an iPhone X, when a full screen component wrapped in a SafeAreaView renders correctly on the root view of the application, it should also render correctly when used inside of a Modal.

Actual Behavior

On an iPhone X, a full screen component wrapped in a SafeAreaView renders correctly on the root view of the application but it does not render correctly when used inside of a Modal.

Specifically, the HEADER margin is present but the FOOTER margin is missing. The full screen component goes to the bottom edge of the iPhone X (simulator).

Steps to Reproduce

  1. Run the Snack on an iPhone X simulator
  2. Find render() and note the two options (one with modal, one not)
  3. Comment the options appropriately and see the issue
  4. Remember, you need to run this on an iPhone X to see the problem

https://snack.expo.io/@lutherbaker/modal---safeareaview

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions