Re: [csswg-drafts] [selectors] :focus-visible on a <select> element (#5822)

Hmm, Chrome's behavior seems a bit more subtle. Both browsers match `:focus` at the same time:

```
data:text/html,<style>:focus { outline: 1px solid green }</style><select><option>abc</option><option>def</option></select>
```

But it seems that chrome by default doesn't show outlines if the dropdown is open:

```
data:text/html,<select><option>abc</option><option>def</option></select>
```

But it does match `:focus-visible` (?):

```
data:text/html,<style>:focus-visible { outline: 1px solid green }</style><select><option>abc</option><option>def</option></select>
```

That's very odd and it means that authors can't really accomplish the native behavior. I think Chrome behavior is wrong, it should either not match `:focus-visible` when the dropdown is open, or it should behave like Firefox.

-- 
GitHub Notification of comment by emilio
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5822#issuecomment-750594601 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 23 December 2020 23:55:08 UTC