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

single-dropdown shows focus rectangle when :disabled? true #256

Open
hipitihop opened this issue Mar 1, 2021 · 1 comment
Open

single-dropdown shows focus rectangle when :disabled? true #256

hipitihop opened this issue Mar 1, 2021 · 1 comment

Comments

@hipitihop
Copy link
Contributor

While the dropdown correctly shows disabled background and sans dropdown button, it still shows the focus rectangle when clicked or keyboard navigated to (tab).

image

@superstructor
Copy link
Contributor

This is because:

  1. the browser has default 'user agent' styles for focus like:
:focus {
outline: -webkit-focus-ring-color auto 1px;
}
  1. for 'native input' components such as <input ..> the browser also disables those styles when disabled
  2. [single-dropdown ...] is just a structured of styled div > a > span. Not a 'native input' component.

I attempted adding the disabled attribute to the structure when disabled? is true e.g. <span disabled> etc but it had no impact on the styling.

This will need to be fixed in the future styling changes w/ a class that alters the :focus styles when disabled? is true. Cannot fix at the moment as we cannot change :focus styles with inline styles.

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