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

Use disabled styling for the button part of the custom-file input #28176

Closed
nathanmesser opened this issue Feb 5, 2019 · 1 comment · Fixed by #29022
Closed

Use disabled styling for the button part of the custom-file input #28176

nathanmesser opened this issue Feb 5, 2019 · 1 comment · Fixed by #29022

Comments

@nathanmesser
Copy link

Disabled styling was added to the custom file input recently, but that didn't cover the button part of the component, so the button looks enabled when the input is disabled.

I think this could be achieved by adding something like:

&::after {
opacity: $btn-disabled-opacity;
@include box-shadow(none);
}

to the
&:disabled {
~ .custom-control-label {

section of the _custom_forms.scss

@rcoops
Copy link

rcoops commented Feb 6, 2019

I came across this issue a few days ago. While it's good that disabled styling is there at all, it makes it look out-of-sync when one part of the control is clearly disabled and the other is seemingly unaffected, especially where other buttons on the page are also disabled.
If anything it's more important that the 'control' part of the control is shown as disabled. As a consequence a user might assume that the input is disabled only because it can't be typed into and that pressing the button will still allow a file to be chosen. When that doesn't work they'll think it's broken rather than being deliberately disabled for another reason.

Would like to see this sorted out as it seems a simple fix.

mdo added a commit that referenced this issue Jul 13, 2019
While #28450 overhauled a ton of forms work, the  support for this custom file input was ineffective. This updates the selector to target the custom field and gray out the entire field.

Fixes #28176.
XhmikosR pushed a commit that referenced this issue Jul 14, 2019
While #28450 overhauled a ton of forms work, the  support for this custom file input was ineffective. This updates the selector to target the custom field and gray out the entire field.

Fixes #28176.
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

Successfully merging a pull request may close this issue.

2 participants