Files
react-native/packages
Eric RozellandFacebook GitHub Bot 1ffef5669c Fix for multi-root apps with Modal (#46867)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46867

In multi-root Android React Native apps (e.g., multiple ReactFragments), if the following sequence occurs:
1. a Modal is displayed via the secondary root
2. the secondary root is destroyed
3. the app is backgrounded
4. the app is foregrounded

The LifecycleEventListener on the ReactModalHostView will fire, causing the Modal to be rehydrated in the onHostResume callback.

Removing the lifecycle event listener when the modal is detached from the window resolves the issue.

## Changelog

[Android][Fixed] Fix issues with Modals and lifecycle events in multi-surface apps

Reviewed By: alanleedev

Differential Revision: D64001103

fbshipit-source-id: 10f8304cd9cca0d5c90e39f5e361290f4fc35283
2024-10-07 16:09:53 -07:00
..
2024-09-12 09:23:23 -07:00
2024-09-12 09:23:23 -07:00
2024-09-27 00:43:25 -07:00
2024-09-12 09:23:23 -07:00
2024-09-12 09:23:23 -07:00
2024-09-12 09:23:23 -07:00
2024-09-12 09:23:23 -07:00
2024-09-12 09:23:23 -07:00