input-group btn border overlap when hovered #15944

Closed
AlexandruDoda opened this Issue Feb 27, 2015 · 4 comments

5 participants

@AlexandruDoda

The
.input-group-btn:last-child>.btn, .input-group-btn:last-child>.btn-group
property should have z-index:2 to prevent a border overlapping issue on input-group when hovering.

Here is a demo video:
https://www.dropbox.com/s/wq13tw1ttz9oah4/bootstrap_bug.mov?dl=0

@kkirsche kkirsche added a commit to kkirsche/bootstrap that referenced this issue Feb 27, 2015
@kkirsche kkirsche [Fixes #15944] Add Z-Index to avoid border overlapping
[Fixes #15944] Add Z-Index to avoid border overlapping
06cba30
@nextgenthemes

Nice but I am wondering if a z-index 2 (or any value for that matter) will not open up more problems when using this elements inside other z-indexed elements like modals and where bootstrap uses height z-indexes of 1000+ or just some custom z-indexed elements users may use.

@AlexandruDoda

Good point! Maybe assigning a z-index value higher than the top possible component helps. Or maybe the input inside the group should not have a border-right and the button should not have negative margin? There are many approaches to fix this :)

@cvrebert cvrebert added the css label Feb 27, 2015
@cvrebert cvrebert changed the title from Field-Button Group Issue to input-group btn border overlap when hovered Feb 27, 2015
@mdo mdo closed this in #15945 Apr 5, 2015
@matthiaz

Nice but I am wondering if a z-index 2 (or any value for that matter) will not open up more problems when using this elements inside other z-indexed elements like modals and where bootstrap uses height z-indexes of 1000+ or just some custom z-indexed elements users may use.

@AlexandruDoda yeah... I have an input-group on a modal popup and I was receiving a very strange issue. On focus I can't type anything in the field.

I fixed this by adding z-index: 9000 but it might be a good idea to reopen this issue and raise the z-index.

@trevorr
trevorr commented Jun 21, 2016

I've just noticed this change causes the focus outline of inner buttons to be covered:

screen shot 2016-06-21 at 6 21 40 pm

Removing it results in the desired appearance:

screen shot 2016-06-21 at 6 22 29 pm

I don't understand this issue, since the demo video link is now broken, but why does the fix only apply to .input-group-btn:last-child and not the analogous .input-group-btn:first-child? Perhaps active/focused buttons should get z-index: 3, similar to .form-control:focus?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment