Skip to content

Commit

Permalink
fix Modal content being cut off when Activity is edge-to-edge
Browse files Browse the repository at this point in the history
Summary:
Fixing issue raised in facebook#47307

This is a follow up from D62286026.
It appears there was a line that went missing while trying to refactor the code.

`fitsSystemWindows = true` is needeod for < API 30 to avoid content rendering under the system bars when Modal is shown with Activity that is edge-to-edge.

Differential Revision: D65280014
  • Loading branch information
alanleedev authored and facebook-github-bot committed Oct 31, 2024
1 parent e5dd7d6 commit 2fe8c0e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,13 @@ public class ReactModalHostView(context: ThemedReactContext) :
* changed. This has the pleasant side-effect of us not having to preface all Modals with "top:
* statusBarHeight", since that margin will be included in the FrameLayout.
*/
get() = FrameLayout(context).apply { addView(dialogRootViewGroup) }
get() =
FrameLayout(context).apply {
addView(dialogRootViewGroup)
if (!statusBarTranslucent) {
this.fitsSystemWindows = true
}
}

/**
* updateProperties will update the properties that do not require us to recreate the dialog
Expand Down

0 comments on commit 2fe8c0e

Please sign in to comment.