react-navigation / react-navigation/react-navigation

[Android] "formSheet" displays above tab bar in nested layout

Open
#12,925 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug platform:android repro provided
Dominant language
TypeScript
Stars
24.5k
Forks
5.1k
Avg merge
1d 5h
Merged PRs (30d)
18

Description

Current behavior

When you have a Stack nested in a Tabs layout. Where the Stack has a Screen with presentation: 'formSheet', then on android it displays above the tab bar of the parent layout. On iOS it displays over the tab bar, thus hiding it which is what I expected it to do and believe should be the correct behavior.

I know that I can just move formSheet displayed screen outside of the tab layout and then it should work. However, I'm trying to have this form sheet control filters that affect the tab's primary content and those are populated through a context/provider that wraps the layout. I'm sure there are other ways to do this, but I think this should be addressed as suggested.

Image
Expected behavior

The formSheet screen should display over the tab bar. See previous screenshot for comparing iOS to Android behavior.

Reproduction

https://github.com/jermahs/github-issue-android-formsheet-with-tabs

Platform
  • Android
  • iOS
  • Web
  • Windows
  • MacOS
Packages
  • @react-navigation/bottom-tabs
  • @react-navigation/drawer
  • @react-navigation/material-top-tabs
  • @react-navigation/stack
  • @react-navigation/native-stack
  • react-native-drawer-layout
  • react-native-tab-view
Environment
  • [] I've removed the packages that I don't use
package version
expo-router ~6.0.21
@react-navigation/native ^7.1.8
@react-navigation/bottom-tabs ^7.4.0
react-native-screens ~4.16.0"
react-native-safe-area-context ~5.6.0
react-native-gesture-handler ~2.28.0
react-native-reanimated ~4.1.1
react-native 0.81.5
expo ~54.0.31
node v20.19.4
npm or yarn pnpm

Contributor guide

Open the contributing guide

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 with the linked reproduction and inspect the interaction between @react-navigation/bottom-tabs and @react-navigation/native-stack on Android when a nested screen uses presentation: 'formSheet'. Compare the Android result with iOS and verify that the form sheet covers the parent tab bar without breaking the described filter context.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.