-
-
Notifications
You must be signed in to change notification settings - Fork 643
While using measureInWindow, the y value is off #2539
Copy link
Copy link
Closed as not planned
Labels
platform:androidIssue related to Android part of the libraryIssue related to Android part of the libraryplatform:iosIssue related to iOS part of the libraryIssue related to iOS part of the libraryplatform:webThis issue is specific to webThis issue is specific to webrepro-providedA reproduction with a snack or repo is providedA reproduction with a snack or repo is provided
Metadata
Metadata
Assignees
Labels
platform:androidIssue related to Android part of the libraryIssue related to Android part of the libraryplatform:iosIssue related to iOS part of the libraryIssue related to iOS part of the libraryplatform:webThis issue is specific to webThis issue is specific to webrepro-providedA reproduction with a snack or repo is providedA reproduction with a snack or repo is provided
Description
Reposting issue reported here as asked: react-navigation/react-navigation#12294
Given a
useLayoutEffectthat calls themeasureInWindowof a ref , theyvalue is off. It seems to be off by the header height on iOS and web. For Android, I'm not sure what is off by exactly.When the header is transparent or not shown, the
yvalue frommeasureInWindowis correct for iOS and web but it is still off on Android.Steps to reproduce
npm install && npm run devto install the dependencies and start Expo Go in an iOS simulator.win the terminal running metroain the terminal running metrogit checkout transparent-header, reload the apps and see the difference.Snack or a link to a repository
https://github.com/mrzachnugent/react-navigation-measure-in-window-repro
Screens version
4.1.0
React Native version
0.76.3
Platforms
Android, iOS, Web
JavaScript runtime
Hermes
Workflow
Expo managed workflow
Architecture
Fabric (New Architecture)
Build type
None
Device
iOS simulator
Device model
No response
Acknowledgements
Yes