ScreenContainer crashes when rendered inside a React Native Modal
@kkafar is already working on this.
Since Apr 27, 2024.
Assessment
This issue has not been assessed yet.
Description
Description
ScreenContainer tries to read a FragmentManager from the ReactRootView but if this is being rendered within a Modal component the native view will be attached to a DialogRootViewGroup which is attached to the native android.app.Dialog, so its not a child of a ReactRootView. A Dialog is the only way to trap screen reader focus on Android, so we have some use cases where we have to structure it this way.
As far as I can tell, it's just trying to read a FragmentManager from ReactRootView but it should be able to find a FragmentManager when nested inside DialogRootViewGroup as well
Steps to reproduce
- Create a native stack navigator with
createNativeStackNavigator - Render it inside
Modal - Run on an Android device
Snack or a link to a repository
https://gist.github.com/aweary/1f031cedb1cf0998597119acfa2373b7
Screens version
3.18.2
React Native version
0.70
Platforms
Android
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 714
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 71
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from software-mansion/react-native-screens
-
missing-repro platform:ios
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
software-mansion/react-native-screens#4168 · 10 comments · 2 reactions ·
-
area:stack-v4 platform:android
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
software-mansion/react-native-screens#3784 · 5 comments ·
-
cr:missing-info cr:missing-repro cr:platform:android missing-info missing-repro platform:android
Difficulty 4/5 3-5 days Newbie friendliness 42/100
software-mansion/react-native-screens#4677 · 4 comments ·
-
cr:missing-repro cr:platform:ios missing-repro platform:ios
software-mansion/react-native-screens#4671 · 3 comments · 1 assignee ·
-
cr:missing-info cr:missing-repro cr:platform:android missing-info missing-repro platform:android
software-mansion/react-native-screens#4664 · 3 comments · 1 assignee ·
All issues in software-mansion/react-native-screens
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·