[bug]: Combobox input doesn't autofocus inside a dropdown menu
Describe the bug
When rendering a Combobox inside a DropdownMenu, the Combobox's CommandInput doesn't receive focus automatically. I believe this is due to Radix's focus trapping behavior in DropdownMenu conflicting with Combobox's expected autofocus.
Affected component/components
Combobox, Dropdown menu
How to reproduce
Verify here in the Dropdown menu section, just hover over "Apply label": https://ui.shadcn.com/docs/components/combobox#dropdown-menu
Codesandbox/StackBlitz link
https://ui.shadcn.com/docs/components/combobox#dropdown-menu
Logs
System Info
OS: macOS Tahoe
Browser: Google Chrome
Before submitting
- [x] I've made research efforts and searched the documentation
- [x] I've searched for existing issues
I can confirm the issue. The CommandInput does not autofocus when a Combobox is placed inside a Radix DropdownMenu. Expected: Input should focus so users can immediately start typing Actual: User needs to click the input manually
Tested on: macOS 15.5 (24F74) - Apple Silicon browser: Chrome
Thanks for the great library — would like to contribute to this issue
So many issues like this would be resolved by simply migrating shadcn from Radix UI to Base UI...