modern-css-reset
modern-css-reset copied to clipboard
Firefox bug with select and focus-within + scroll-behavior: smooth
Hello!
I've been using your reset for a while (it's great btw thanks), and I've noticed a weird bug on Firefox (87.0) and Ubuntu. When I click on a select
element, the dropdown appears for a fraction of a second, then disapears (I need to click again to have the regular select
behaviour). Then if I move the focus elsewhere, and click again on the select
, nothing appears on the first click.
I've tracked down the problem to this part of the reset
html:focus-within {
scroll-behavior: smooth;
}
I've made a codepen so that you can try and see if you can reproduce the issue https://codepen.io/kimlai/pen/PoWjMyv.
I don't know what's happening, and it's most probably a bug in Firefox, but I thought that I'd let you know, since it makes the reset unusable as is (at least for me).
I can confirm this strange bug in Firefox 88.0 on macOS. Without defining scroll-behavior it works fine.