[Chip] When used as Popover trigger, focus not returned upon closing #25181
Labels
bug 🐛
Something doesn't work
component: chip
This is the name of the generic UI component, not the React module!
component: FocusTrap
The React component.
Current Behavior 😯
If you use a Chip as the trigger for a Popover (e.g. in place of Button in the Simple Popover demo), then focus is not correctly placed on the Chip when you close the Popover. Or, more accurately, it would seem that focus is first placed on the Chip and then it is immediately lost (placed on
body
).Expected Behavior 🤔
Focus should be correctly placed on the triggering Chip upon closing a Popover. In other words, Chip should behave the same as Button, in this regard.
Steps to Reproduce 🕹
Steps:
Context 🔦
Given that both Chip (when "clickable") and Button both render a ButtonBase, which seems to handle all focus-related concerns, I'm not sure why the behavior is different.
If there is a userland workaround (perhaps using ButtonBase's
action
?), that would be acceptable.Or, if you can point me toward what needs fixed, I'm happy to submit a PR.
Your Environment 🌎
Confirmed issue in latest Chrome, Chrome Canary, Firefox, and Safari on MacOS.
`npx @material-ui/envinfo`
The text was updated successfully, but these errors were encountered: