Skip to content

Previous route changes position when overlaying new route #9613

@leecop123

Description

@leecop123

Current Behavior

I'm playing with react-native stack navigators, overlaying views with transition animations and I've noticed an issue which I can't seem to get to grips with. Unsure if it's a bug or if I'm doing/not doing something. Probably the latter.

Basically, the problem is around a view changing position when rendering a new a view (via .navigate()).

I've made a minimal example which can be run on an IOS device via the expo app. From the Home Screen you can click a button which will render the action sheet, with a nice transition preset. This is all good. From the action sheet, you can render a "modal". When the modal renders, you can see the previous view has pushed up the page, as if some margin bottom has been applied. I suspect this has something to do with the device insets, but it's unclear how I can stop this behaviour.

https://snack.expo.io/Jgac-odfZ

Your Environment

software version
iOS or Android 14.5
@react-navigation/native 5.9.4
@react-navigation/stack 5.14.3
react-native-gesture-handler 1.10.3
react-native-safe-area-context 0.7.3
react-native-screens 2.9.0
react-native 0.63.3
expo not using
node 12.16.1
npm or yarn npm

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