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

Border indicating failed input field validation in input group is hidden behind its neighbor element #33541

Closed
n01337 opened this issue Apr 2, 2021 · 4 comments · Fixed by #33644
Labels

Comments

@n01337
Copy link

n01337 commented Apr 2, 2021

In contrast to a focused input element, the invalidity indicator border (red by default) is hidden behind its neighboring elements. It would be worthwhile to optionally allow to show this border around the whole input group or otherwise raise its zIndex appropriately.

Applies to the bootstrap v5.0.0-beta3.

What it looks like
How it should look like

The images are a combination of an input and a select element put within an input group.

@korki43
Copy link

korki43 commented Apr 3, 2021

Example Codepen: https://codepen.io/korki43/pen/ExZmwNr

@korki43
Copy link

korki43 commented Apr 3, 2021

The following lines in mixins/_forms.scss seem to cause the problem:

.input-group .form-control,
.input-group .form-select {
@include form-validation-state-selector($state) {
z-index: 3;
}
}

This was added in #33211 to make the right border of invalid elements in form groups also appear red.

I think reverting #33211 is the best option for now. It violates the z-index scales approach and also doesn't really fix the problem (as you can see in my example with two validated elements).

Ref: #33204 #33211

@jatinmehta
Copy link
Contributor

@mdo I will be creating a PR for this.

@jatinmehta
Copy link
Contributor

I have raised a PR for this here - #33644

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

Successfully merging a pull request may close this issue.

4 participants