From 04378386494fac38002fa7459464952040b58d55 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 25 Feb 2025 11:12:56 -0600 Subject: [PATCH] Fix max height of dialog flatlists (#7839) * Fix max height of dialog flatlists * Remove unneeded wrapper to fix Close positioning * Add wrapper back and fix with position static --- src/components/Dialog/index.web.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/Dialog/index.web.tsx b/src/components/Dialog/index.web.tsx index 066cfbd3a5..a27222229d 100644 --- a/src/components/Dialog/index.web.tsx +++ b/src/components/Dialog/index.web.tsx @@ -125,12 +125,17 @@ export function Outer({ }, ]}> + {/** + * This is needed to prevent centered dialogs from overflowing + * above the screen, and provides a "natural" centering so that + * stacked dialogs appear relatively aligned. + */} {children} @@ -219,8 +224,8 @@ export const InnerFlatList = React.forwardRef< style={[ a.overflow_hidden, a.px_0, - // @ts-expect-error web only -sfn - {maxHeight: 'calc(-36px + 100vh)'}, + // 100 minus 10vh of paddingVertical + web({maxHeight: '80vh'}), webInnerStyle, ]} contentContainerStyle={[a.px_0, webInnerContentContainerStyle]}>