Skip to content

Commit bae640a

Browse files
authored
fix: Prevent submenus from closing on scroll (#7894)
1 parent 5143e07 commit bae640a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/@react-aria/overlays/src/usePopover.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export function usePopover(props: AriaPopoverProps, state: OverlayTriggerState):
106106
targetRef: triggerRef,
107107
overlayRef: popoverRef,
108108
isOpen: state.isOpen,
109-
onClose: isNonModal ? state.close : null
109+
onClose: isNonModal && !isSubmenu ? state.close : null
110110
});
111111

112112
usePreventScroll({

packages/react-aria-components/docs/SearchField.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ import {SearchField, Label, Input, Button} from 'react-aria-components';
7878

7979
.react-aria-Input {
8080
grid-area: input;
81+
width: 100%;
8182
padding: 0.286rem 1.714rem 0.286rem 0.286rem;
8283
margin: 0;
8384
border: 1px solid var(--border-color);

0 commit comments

Comments
 (0)