Skip to content

navigation.goBack() not working properly #7932

@mehdiamiri1440

Description

@mehdiamiri1440

What happened?

I have an RTL Android app written in react-native and I have designed a customized header navigator for all of the menus and the screens instead of using the default header of the react-navigation. In this component, I have a back button that uses navigation.goBack() behind the scene. However, when I navigate from a sibling menu using the react-navigation bottom menu to another menu and then in that presented menu I go 2 levels down in the screens and try to move up again, it gets stuck in the first level and does not go back after that unless I switch the menus. Even after switching the menus, it behaves weirdly.

What was the expected behaviour?

The expected behavior is that the navigator should go up one level to the first screen, then to the last opened menu, and then exit the app if it continues to be pressed.

Was it tested on latest react-native-navigation?

  • I have tested this issue on the latest react-native-navigation release and it still reproduces.

Help us reproduce this issue!

No response

In what environment did this happen?

React Native Navigation version: 6.0
React Native version: 0.72
Has Fabric (React Native's new rendering system) enabled: (yes/no) no
Node version: 18.00
Device model: Pixel 2
Android version: 12

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