File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
packages/react/src/SelectPanel Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments