Skip to content

Commit

Permalink
WIP(ui-select): experiment with shouldContainFocus
Browse files Browse the repository at this point in the history
Closes: INSTUI-4189
  • Loading branch information
joyenjoyer committed Sep 2, 2024
1 parent 2cf4255 commit 9272380
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ui-popover/src/Popover/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ type PopoverOwnProps = {
/**
* Whether focus should contained within the `<Popover/>` when it is open
*/
shouldContainFocus?: boolean
shouldContainFocus?: boolean | ("keyboard" | "screenreader")[] | undefined

/**
* Whether focus should be returned to the trigger when the `<Popover/>` is closed
Expand Down
1 change: 1 addition & 0 deletions packages/ui-select/src/Select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ class Select extends Component<SelectProps> {
mountNode={mountNode}
positionTarget={this._inputContainer}
isShowingContent={isShowingOptions}
shouldContainFocus={['screenreader']}
shouldReturnFocus={false}
withArrow={false}
>
Expand Down

0 comments on commit 9272380

Please sign in to comment.