Here is the pen: https://codepen.io/Supersudo/pen/abZMvmJ?editors=1000
In Firefox, the select menu is focused when when the disabled option was clicked. In Chrome, it doesn’t focus unless you click around the disabled option.
Is there a way to focus the select menu even if the clicked option is disabled?
Gandalf
November 16, 2020, 7:16am
2
If you could focus on it it wouldn’t be disabled.
Only option is disabled, I want to focus the whole select menu.
PaulOB
November 16, 2020, 3:56pm
4
I’m not sure of the consequences but you could try pointer-events:none on the disable option which should let the click pass through to the select.
SCSS
select[multiple] {
height: calc(1.5em + 0.75rem + 2px) !important;
position: relative;
option {
padding: 0.375rem 0.75rem;
}
option[disabled]{pointer-events:none;}
}
system
Closed
February 15, 2021, 10:57pm
5
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.