Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Height of header with active search input seems to be ignored during back navigation transition on iOS #11882

Open
3 of 12 tasks
bakkerjoeri opened this issue Mar 11, 2024 · 0 comments

Comments

@bakkerjoeri
Copy link

Current behavior

Steps to reproduce using this example https://snack.expo.dev/@joeri.cineville.nl/search-in-react-navigation?platform=ios

  1. Make sure you're using the app on iOS
  2. On the initial screen tap the search input in the header
  3. While focus is still on the search input navigate to the next screen (in a real world example this could be a search result)
  4. Navigate back to the previous screen

Notice that for a moment the header occupies no height, until focus returns to the search input, after which the contents of the screen jump down.

This happens regardless of the values of hideWhenScrolling and hideNavigationBar.

Navigating without searching does not have the same effect, so it seems to be directly related to using the header's search function.

RPReplay_Final1710151951.mp4

Expected behavior

The header should occupy its correct height while the navigation transition occurs, so that when the transition ends there is no janky content position jump.

Reproduction

https://snack.expo.dev/@joeri.cineville.nl/search-in-react-navigation?platform=ios

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-tab-view

Environment

  • I've removed the packages that I don't use
package version
@react-navigation/native 6.1.15
@react-navigation/native-stack 6.9.24
react-native-safe-area-context 4.8.2
react-native-screens 3.29.0
expo 50.0.0
node 20.11.1
yarn 3.6.3
@bakkerjoeri bakkerjoeri changed the title Height of header with active search input temporarily ignored when navigating back on iOS Height of header with active search input seems to be ignored during back navigation transition on iOS Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant