-
-
Notifications
You must be signed in to change notification settings - Fork 540
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
Native-Stack Modal height calculation is off #2587
Comments
Thanks for the report. Notes for future me: |
Accidentally closed this, sorry! 😅 |
@kkafar any updates on this one 😄 I would also be happy to look into the measurement code, I just haven't been able to pin-point where the calculation happens of adding the header height |
I haven't had opportunity to work on this yet. Unfortunately the layout code & interaction between UIKit & React Native's layout is too complex to describe in few minutes, however places to start are:
|
Yah, when digging through the code with breakpoints I got the sense it got more and more complex as I made my way through, I'm willing to spend some time on this if I find something I'll update the thread. Thank you! |
Hi there, wondering if there is any update on this thread |
Hey, unfortunately not. I haven't had opportunity to look into it yet :/ |
All good! Appreciate the response I know you're super busy 🙇 |
Description
I'm having a hard time creating a stable reproduction for this as it's very specific.
What I have found is that when lazy loading modal routes with
React.lazy
andSuspense
boundary - only the initial height calculation of the native modal is off.When I close and re-open it, it calculates correctly to 802. If I don't lazy load the route, it calculates correctly from the get-go.
The only thing I can trace it back to is the usage of Suspense itself.
At the top-most level I have a view where I plug in
What I see in my app, is I get is
874
and it never recalculates.However if I implement a similar UI setup in a snack I get
874
followed by a recalculation to802
.If I load it immediately without lazy loading I get
802
and it's stable.My bug is that I get
874
as the modal height and it does not recalculate properlySteps to reproduce
I don't have a stable reproduction of it staying stuck at 874, but the snack linked shows it calculating 874 then going back to 802.
This is only on the initial render, not subsequent renders
I wish I could create an actual reproduction where it gets stuck at 874, but I have had no luck
Snack or a link to a repository
https://snack.expo.dev/0UhdKCLtMNc15_r6uAHrJ
Screens version
4.3.0
React Native version
0.76.5
Platforms
iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
None
Device
iOS simulator
Device model
iPhone 11,13,15,16
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: