Skip to content

Commit

Permalink
Merge pull request #49233 from Expensify/cmartins-fixSavedIssues
Browse files Browse the repository at this point in the history
Fix overlapping scrollview
  • Loading branch information
luacmartins authored Sep 16, 2024
2 parents 64b999a + c723dfc commit 7d60884
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/PopoverMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import useKeyboardShortcut from '@hooks/useKeyboardShortcut';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
import * as Browser from '@libs/Browser';
import * as Modal from '@userActions/Modal';
import CONST from '@src/CONST';
Expand Down Expand Up @@ -135,6 +136,7 @@ function PopoverMenu({
const [currentMenuItems, setCurrentMenuItems] = useState(menuItems);
const currentMenuItemsFocusedIndex = currentMenuItems?.findIndex((option) => option.isSelected);
const [enteredSubMenuIndexes, setEnteredSubMenuIndexes] = useState<readonly number[]>(CONST.EMPTY_ARRAY);
const {windowHeight} = useWindowDimensions();

const [focusedIndex, setFocusedIndex] = useArrowKeyFocusManager({initialFocusedIndex: currentMenuItemsFocusedIndex, maxIndex: currentMenuItems.length - 1, isActive: isVisible});

Expand Down Expand Up @@ -256,7 +258,7 @@ function PopoverMenu({
restoreFocusType={restoreFocusType}
>
<FocusTrapForModal active={isVisible}>
<ScrollView style={isSmallScreenWidth ? {} : styles.createMenuContainer}>
<ScrollView style={isSmallScreenWidth ? {maxHeight: windowHeight - 250} : styles.createMenuContainer}>
{renderHeaderText()}
{enteredSubMenuIndexes.length > 0 && renderBackButtonItem()}
{currentMenuItems.map((item, menuIndex) => (
Expand Down

0 comments on commit 7d60884

Please sign in to comment.