Skip to content

Commit acb261c

Browse files
Saadnajmiclaude
andcommitted
fix(ContextualMenu): restore onDismiss in Callout slot props
Destructuring onDismiss from userProps removed it from the ...rest spread that gets passed to the Callout root slot. The Callout needs onDismiss to function correctly — without it, the MenuButton SPACE key test consistently failed because the menu couldn't dismiss/toggle properly. Fix: destructure onDismiss AND explicitly pass it back in the root slot props. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ba70449 commit acb261c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/components/ContextualMenu/src/ContextualMenu.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export const ContextualMenu = compose<ContextualMenuType>({
8080
root: {
8181
accessibilityRole: 'menu',
8282
setInitialFocus: shouldFocusOnMount,
83+
onDismiss,
8384
...rest,
8485
},
8586
container: {

0 commit comments

Comments
 (0)