Skip to content

Commit 1859c04

Browse files
committed
preventBubbling behind FF
1 parent 53546ab commit 1859c04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/react/src/SelectPanel/SelectPanel.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ function Panel({
216216
const usingFullScreenOnNarrow = disableFullscreenOnNarrow ? false : featureFlagFullScreenOnNarrow
217217
const shouldOrderSelectedFirst =
218218
useFeatureFlag('primer_react_select_panel_order_selected_at_top') && showSelectedOptionsFirst
219+
const usingRemoveActiveDescendant = useFeatureFlag('primer_react_select_panel_remove_active_descendant')
219220

220221
// Single select modals work differently, they have an intermediate state where the user has selected an item but
221222
// has not yet confirmed the selection. This is the only time the user can cancel the selection.
@@ -794,7 +795,7 @@ function Panel({
794795
}
795796
: {}),
796797
} as React.CSSProperties,
797-
onKeyDown: preventBubbling(overlayProps?.onKeyDown),
798+
onKeyDown: usingRemoveActiveDescendant ? preventBubbling(overlayProps?.onKeyDown) : overlayProps?.onKeyDown,
798799
}}
799800
focusTrapSettings={focusTrapSettings}
800801
focusZoneSettings={focusZoneSettings}

0 commit comments

Comments
 (0)