Skip to content
8 changes: 5 additions & 3 deletions src/components/PopoverMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,8 @@ function PopoverMenu({
return styles.createMenuContainer;
}, [isSmallScreenWidth, shouldEnableMaxHeight, windowHeight, styles.createMenuContainer]);

const {paddingTop, paddingBottom, paddingVertical, ...restScrollContainerStyle} = (StyleSheet.flatten([styles.pv4, scrollContainerStyle]) as ViewStyle) ?? {};

return (
<PopoverWithMeasuredContent
anchorPosition={anchorPosition}
Expand All @@ -431,18 +433,18 @@ function PopoverMenu({
shouldEnableNewFocusManagement={shouldEnableNewFocusManagement}
useNativeDriver
restoreFocusType={restoreFocusType}
innerContainerStyle={innerContainerStyle}
innerContainerStyle={{...styles.pv0, ...innerContainerStyle}}
shouldUseModalPaddingStyle={shouldUseModalPaddingStyle}
testID={testID}
>
<FocusTrapForModal active={isVisible}>
<View
onLayout={onLayout}
style={[menuContainerStyle, containerStyles]}
style={[menuContainerStyle, containerStyles, {paddingTop, paddingBottom, paddingVertical, ...(isWebOrDesktop ? styles.flex1 : styles.flexGrow1)}]}
>
{renderHeaderText()}
{enteredSubMenuIndexes.length > 0 && renderBackButtonItem()}
{renderWithConditionalWrapper(shouldUseScrollView, scrollContainerStyle, renderedMenuItems)}
{renderWithConditionalWrapper(shouldUseScrollView, restScrollContainerStyle, renderedMenuItems)}
</View>
</FocusTrapForModal>
</PopoverWithMeasuredContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function SearchTypeMenuPopover({queryJSON}: SearchTypeMenuNarrowProps) {
shouldUseModalPaddingStyle={false}
innerContainerStyle={{paddingBottom: unmodifiedPaddings.bottom}}
shouldAvoidSafariException
scrollContainerStyle={styles.pv0}
/>
)}
<DeleteConfirmModal />
Expand Down