Skip to content

[iOS] Unexpected Navigation Behavior When Swiping Back Quickly #2559

@Unuuuuu

Description

@Unuuuuu

Description

When using iOS devices with the following dependencies, swiping back quickly during stack navigation leads to unexpected behavior:

Expected behavior: stack a -> stack b -> stack c -> stack b -> stack a
Actual behavior: stack a -> stack b -> stack c -> stack b -> stack a -> stack b -> stack a
The issue occurs only when swiping back quickly. When swiping back slowly, the navigation works as expected.

Expected Behavior

expected-behavior.MP4

Actual Behavior

actual-behavior.MP4

Steps to reproduce

  1. Enable fullScreenGestureEnabled in the navigation options.
  2. Set up stack navigation with three screens: stack a, stack b, and stack c.
  3. Navigate through the stack in order: stack a -> stack b -> stack c.
  4. Swipe back quickly from stack c to stack b, and then quickly swipe back again from stack b to stack a.
  5. Observe the unexpected behavior.

Snack or a link to a repository

https://github.com/Unuuuuu/react-native-screens-repro

Screens version

4.3.0

React Native version

0.76.3

Platforms

iOS

JavaScript runtime

None

Workflow

Expo managed workflow

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

Real device

Device model

iphone 15 pro

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: iOSThis issue is specific to iOSRepro providedA reproduction with a snack or repo is provided

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions