-
Notifications
You must be signed in to change notification settings - Fork 2k
Labels
component: content-switcherpackage: @carbon/react@carbon/react@carbon/reactrole: dev 🤖severity: 2https://ibm.biz/carbon-severityhttps://ibm.biz/carbon-severitytype: bug 🐛
Description
Package
@carbon/react
Browser
Firefox
Package version
1.88.0
React version
19.1.1
Description
Based on this link, the activation in case of manual selectionMode needs to happen only via Enter or Space.
Currently, it happens on any keypress. I think we need to update the below code to add a check if it's a MouseEvent or if it's a Enter or Space Keyboard event.
carbon/packages/react/src/components/ContentSwitcher/ContentSwitcher.tsx
Lines 157 to 161 in b80a090
} else if (selectedIndex !== index) { | |
setSelectedIndex(index); | |
focusSwitch(index); | |
onChange(event); | |
} |
Reproduction/example
Steps to reproduce
Go to the above link. Navigate to a tab via tab key, press any key (for example d
) to see the tab activate.
Suggested Severity
None
Application/PAL
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
- I checked the current issues for duplicate problems
Metadata
Metadata
Assignees
Labels
component: content-switcherpackage: @carbon/react@carbon/react@carbon/reactrole: dev 🤖severity: 2https://ibm.biz/carbon-severityhttps://ibm.biz/carbon-severitytype: bug 🐛
Type
Projects
Status
✅ Done