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

formSheet modal is invisible in brownfield Fabric apps until re-render because postponed enter transition never starts

Open
#4,010 1 comment 0 reactions 1 assignee View on GitHub

@t0maboro is already working on this.

Since May 14, 2026.

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

Description

Description

In brownfield Android apps using Fabric (New Architecture), formSheet modals are invisible upon presentation. The modal is correctly sized and positioned behind the scenes, but the fragment's postponed enter transition is never started, so it never becomes visible. The user must trigger a re-layout (e.g., lock/unlock the screen) for the modal to appear.

Root cause

The bug was introduced in https://github.com/software-mansion/react-native-screens/pull/3404

In ScreenStackFragment.onCreateView(), for formSheet presentation, BottomSheetTransitionCoordinator waits for both a layout callback and an insets callback before calling startPostponedEnterTransition(). In brownfield apps, the host activity's window insets have already been dispatched before the formSheet's ViewCompat.setOnApplyWindowInsetsListener is attached (because the RN surface is hosted inside a fragment that was added to an already-running activity). This means areInsetsApplied in BottomSheetTransitionCoordinator never becomes true, and the postponed enter transition is permanently stuck.

The pre-layout pass in onCreateView() correctly measures and lays out the coordinatorLayout, giving the screen valid dimensions. But the transition doesn't start because it's waiting for the insets callback that will never come.

Steps to reproduce
  1. Set up a brownfield Android app with Fabric enabled (New Architecture)
  2. Host a React Native surface inside a Fragment (e.g., using ReactSurfaceView in a custom Fragment)
  3. Navigate to a screen that presents a formSheet modal
  4. The modal is invisible — the bottom sheet is sized correctly but the fragment transition never starts
  5. Lock and unlock the phone — the modal suddenly becomes visible (because the re-layout triggers the transition)
Snack or a link to a repository

https://github.com/lhanindeed/react-native-screens-brownfield-bug-repro

Screens version

4.24.0

React Native version

0.83.2

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

Release mode

Device

Real device

Device model

No response

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.