Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Firefox bug with select and focus-within + scroll-behavior: smooth #43

Open
kimlai opened this issue Apr 5, 2021 · 1 comment
Open

Comments

@kimlai
Copy link

kimlai commented Apr 5, 2021

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).

@karlschwaier
Copy link

I can confirm this strange bug in Firefox 88.0 on macOS. Without defining scroll-behavior it works fine.

Kirtishukla2004 added a commit to Kirtishukla2004/modern-css-reset that referenced this issue Mar 14, 2023
…dy-set-studio#43

updated scroll behaviour with auto  as this issue i think this can solve the issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants