Repository navigation
fix: measureInWindow calculations for Modal with formSheet presentation
#59098
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
base: main
Are you sure you want to change the base?
Changes from all commits
1abd78f
8bf9a7f
d176748
7f30936
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,4 +14,9 @@ namespace facebook::react { | |
|
|
||
| extern const char ModalHostViewComponentName[] = "ModalHostView"; | ||
|
|
||
| Transform ModalHostViewShadowNode::getTransform() const { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, fixed it! |
||
| auto viewportOffset = getStateData().viewportOffset; | ||
| return Transform::Translate(viewportOffset.x, viewportOffset.y, 0); | ||
| } | ||
|
|
||
| } // namespace facebook::react | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this offset can get stale. It's only read when bounds change, so a sheet that moves without resizing (iPad rotation, keyboard) keeps the old value. The first read might also happen mid-animation or before the view has a window. Maybe read it again in
viewDidAppear?