Skip to content

Commit

Permalink
fix: Prevent submenus from closing on scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
devongovett committed Mar 7, 2025
1 parent 55113ca commit 10232fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@react-aria/overlays/src/usePopover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function usePopover(props: AriaPopoverProps, state: OverlayTriggerState):
targetRef: triggerRef,
overlayRef: popoverRef,
isOpen: state.isOpen,
onClose: isNonModal ? state.close : null
onClose: isNonModal && !isSubmenu ? state.close : null
});

usePreventScroll({
Expand Down
1 change: 1 addition & 0 deletions packages/react-aria-components/docs/SearchField.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ import {SearchField, Label, Input, Button} from 'react-aria-components';

.react-aria-Input {
grid-area: input;
width: 100%;
padding: 0.286rem 1.714rem 0.286rem 0.286rem;
margin: 0;
border: 1px solid var(--border-color);
Expand Down

0 comments on commit 10232fc

Please sign in to comment.