From 0f27fdda654dcdfdc63d39d00c4fcfcc2e96219f Mon Sep 17 00:00:00 2001 From: DS Boyce <260543580+ds-boyce@users.noreply.github.com> Date: Mon, 20 Jul 2026 10:01:31 -0700 Subject: [PATCH] Add height constraint to full-height bottom sheets (#11178) --- modules/bottom-sheet/src/BottomSheetNativeComponent.tsx | 3 ++- src/components/Dialog/index.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/bottom-sheet/src/BottomSheetNativeComponent.tsx b/modules/bottom-sheet/src/BottomSheetNativeComponent.tsx index 0c3c700e90..f2955395e6 100644 --- a/modules/bottom-sheet/src/BottomSheetNativeComponent.tsx +++ b/modules/bottom-sheet/src/BottomSheetNativeComponent.tsx @@ -146,6 +146,7 @@ function BottomSheetNativeComponentInner({ const insets = useSafeAreaInsets() const cornerRadius = rest.cornerRadius ?? 0 const {height: screenHeight} = useWindowDimensions() + const isHeightConstrained = maxHeight != null || rest.fullHeight === true // sigh... on older Android versions, screenHeight does not include safe area insets // on newer Androids + iOS, it does. we need to find the inner bit + the bottom inset @@ -182,7 +183,7 @@ function BottomSheetNativeComponentInner({ ]}> + style={isHeightConstrained ? {flex: 1} : undefined}> {children} diff --git a/src/components/Dialog/index.tsx b/src/components/Dialog/index.tsx index bd23e566ad..c9f23175de 100644 --- a/src/components/Dialog/index.tsx +++ b/src/components/Dialog/index.tsx @@ -157,7 +157,8 @@ export function Outer({ [open, close], ) - const isHeightConstrained = nativeOptions?.maxHeight != null + const isHeightConstrained = + nativeOptions?.maxHeight != null || nativeOptions?.fullHeight === true const context = useMemo( () => ({