software-mansion / software-mansion/react-native-screens

Fade animation of modal backdrop not working when navigating to screen with `presentation: 'modal'` in `NativeStackNavigator`

Open
#2,977 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

platform:ios repro-provided
Dominant language
TypeScript
Stars
3.7k
Forks
714
Avg merge
2d 23h
Merged PRs (30d)
71

Description

Description

On physical iOS devices, the backdrop (background overlay) of a modal screen does not fade in when using presentation: 'modal' with NativeStackNavigator. This results in a jarring, unsmooth appearance when opening modals.

Details
  • Only occurs with NativeStackNavigator. When using the regular StackNavigator, the backdrop fade animation works as expected.
  • Only affects physical iOS devices. The animation works correctly on simulators.
  • Only affects the first modal. If you open a second modal on top of the first, the fade animation does apply to the second modal’s backdrop.
  • Only on modal enter. When closing (exiting) a modal, the backdrop fade animation always works as expected.
  • Occurs in both new and old React Native architectures.

Video Demonstrations
NativeStackNavigator (Issue Present)
  • The first modal opens without a backdrop fade-in. Notice that the second modal’s backdrop does fade in as expected:

https://github.com/user-attachments/assets/bdafcbd9-b553-42cb-8007-39f467557f31

StackNavigator (Works Correctly)
  • The backdrop fade animation works on every modal:

https://github.com/user-attachments/assets/91d8d820-8681-4ed6-bf7d-0b1a4b32d8c9


Summary
  • First modal with NativeStackNavigator on physical iOS: no backdrop fade-in animation
  • Every other case (simulator, second modal, exit, StackNavigator): fade animation works as expected
Steps to reproduce
  1. Open expo snack on physical device
  2. Click Open Modal 1 and observe the missing fade animation on the backdrop.
Snack or a link to a repository

https://snack.expo.dev/@supermelle/modal

Screens version

4.11.1

React Native version

0.80.0

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

None

Build type

Release mode

Device

Real device

Device model

iPhone 16 Pro and iPhone 13

Acknowledgements

Yes

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the NativeStackNavigator modal presentation path and reproduce the issue with the linked Snack on a physical iOS device. Compare the first modal with the second modal and with StackNavigator; done means the first modal's backdrop fades in on entry while existing exit behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.