Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First item in Select doesn't receive focus when Select used within Dialog #3306

Open
mbosecke opened this issue Jan 1, 2025 · 0 comments · May be fixed by #3313
Open

First item in Select doesn't receive focus when Select used within Dialog #3306

mbosecke opened this issue Jan 1, 2025 · 0 comments · May be fixed by #3313

Comments

@mbosecke
Copy link

mbosecke commented Jan 1, 2025

Bug report

Current Behavior

When a user clicks on a Select that is nested within a Dialog, the first SelectItem does not automatically get focused. This breaks typeahead and the ability to navigate between items using a keyboard.

A Select outside of a dialog works correctly.

In the following gif I first open up a Select outside a dialog and I'm able to successfully use my keyboard to navigate between the items. I then open a Select within a dialog and because it doesn't focus on the first SelectItem I can't navigate between the items with my keyboard.

select-within-dialog

Expected behavior

When a user clicks on a Select in a Dialog, the first SelectItem should automatically receive focus.

Reproducible example

CodeSandbox Template

Additional context

Possibly related to #3268

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-dialog, @radix-ui/react-select
React n/a
Browser Google Chrome
Assistive tech
Node n/a
npm/yarn
Operating System
kanavbajaj added a commit to kanavbajaj/primitives that referenced this issue Jan 8, 2025
@kanavbajaj kanavbajaj linked a pull request Jan 8, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant