Current Behavior 😯
There is some issue with :focus-visible for Select. For the first time when there is no value selected .Mui-focusVisible class is getting applied to the first item in a list. This is not the case for the Menu component though. Also, this happens only in Chrome.
Expected Behavior 🤔
Same behaviour as the Menu component has.
Steps to Reproduce 🕹
Two components side by side:https://codesandbox.io/s/material-ui-issue-forked-udm04?file=/src/Demo.js
Steps:
Case 1:
- Open Select via mouse click
- The first item is highlighted with a red border meaning the
focusVisible class was added
Case 2:
- Refresh a page
- Open Menu via mouse click everything works as expected
Context 🔦
Want have focus applied on Select only when it was focused with a keyboard. The options should also stay without focus if the keyboard wasn't used
Your Environment 🌎
| Tech |
Version |
| Material-UI |
v5.0.0.alpha.17 |
| React |
17 |
| Browser |
Chrome |
| TypeScript |
|
| etc. |
|
Current Behavior 😯
There is some issue with
:focus-visiblefor Select. For the first time when there is no value selected.Mui-focusVisibleclass is getting applied to the first item in a list. This is not the case for the Menu component though. Also, this happens only in Chrome.Expected Behavior 🤔
Same behaviour as the Menu component has.
Steps to Reproduce 🕹
Two components side by side:https://codesandbox.io/s/material-ui-issue-forked-udm04?file=/src/Demo.js
Steps:
Case 1:
focusVisibleclass was addedCase 2:
Context 🔦
Want have focus applied on Select only when it was focused with a keyboard. The options should also stay without focus if the keyboard wasn't used
Your Environment 🌎