Closed
Description
Bug report
Current Behavior
Given a CheckboxItem that has asChild={true}
and is the first item in the dropdown.
When you use enter
to activate the trigger:
- Menu will not open
onCheckChange
is called on the first menu item- If you add
onSelect={(e) => e.preventDefault()}
the menu does stay open
When you use space
to activate the trigger:
- Menu will open
onCheckChange
is called on the first menu item
Expected behavior
Menu should open and first item should not have onCheckChange
called.
Reproducible example
Steps to reproduce in this codesandbox:
- Focus the trigger
enter
,esc
,enter
,esc
You should see the menu open and close and the first item toggles on / off as you do this.
Suggested solution
Additional context
Your environment
Software | Name(s) | Version |
---|---|---|
Radix Package(s) | dropdown-menu | 0.1.6 |
React | n/a | |
Browser | chrome | 99.0.4844.82 |
Assistive tech | ||
Node | n/a | |
npm/yarn | ||
Operating System | windows |
Metadata
Metadata
Assignees
Labels
No labels