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

Header height not getting calculated in pageY value for components in new architecture #11894

Closed
2 of 11 tasks
ManiTWIndia opened this issue Mar 14, 2024 · 3 comments
Closed
2 of 11 tasks

Comments

@ManiTWIndia
Copy link

ManiTWIndia commented Mar 14, 2024

Current behavior

When using default header from the stack navigation, facing inconsistency in pageY value of component rendered in old and new architecture. In the example screenshots, I am passing screenOptions={{headerStyle: {height: 150}}} to Stack navigator in React native new architecture and the pageY is being returned without taking the header height into consideration.
iOS new architecture

Expected behavior

But in old architecture in iOS, the header height is included in the pageY value.
iOS old architecture

The issue happens in iOS new architecture only. A lot of existing libraries we were using is getting affected when using the stack navigation in new architecture. In android, even with the new architecture the pageY value is the same including the header height in both old and new architecture.

Reproduction

https://github.com/ManiTWIndia/stack-navigation-header-issue

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

package version
@react-navigation/native 6.1.16
@react-navigation/stack 6.3.28
react-native-safe-area-context 4.9.0
react-native-screens 3.29.0
react-native-gesture-handler 2.15.0
react-native-reanimated 3.8.0
react-native 6.1.16
node v20.11.1
npm or yarn 10.2.4
@satya164
Copy link
Member

Please open an issue in React Native repo. React Navigation isn't giving you pageY value.

Copy link

Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro.

@ManiTWIndia
Copy link
Author

In old architecture and in new architecture android, the pageY value is returned as expected. Even in iOS, when i use headerShown: false or custom header in react-navigation stack, the pageY value is returned as expected.
I am seeing this issue only when using the default header of react-navigation stack in new architecture. So please do have a look

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

2 participants