Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hitting escape clears the input field focus class as well as the combo box #575

Open
jennikate opened this issue Dec 5, 2022 · 1 comment

Comments

@jennikate
Copy link

To replicate:

  • start typing in an autocomplete input
  • field shows focus style (has focused class)

  • combo box shows

  • hit escape
  • combo box hides

The issue: the GDS focus style is removed, however the browser focus style is shown

It's happening because the escape key clears not only the combo box but the input focus class, however the input is still in focus so the browser default style shows.

To view in action:

look at the html for the input it has autocomplete__input--focused when you type
hit escape it clears that class but the input is still in focus so browser focus style takes over

It's a small issue but it does mean we have inconsistent styling so I wanted to raise it for consideration :)

@edwardhorsford
Copy link
Contributor

Possibly related: #333 and #73

I think all relate to the autocomplete not explicitly styling focus and only using the focus class. In my own services I explicitly define focus to catch these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants