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 z-index 3 to show focus state on all sides of input #17007

Closed
wants to merge 1 commit into from

Conversation

kkirsche
Copy link
Contributor

@kkirsche
Copy link
Contributor Author

Travis, please restart tests

Failed to:
The command "if [ "$TWBS_TEST" = validate-html ] && [ $TWBS_DO_VALIDATOR -ne 0 ]; then ./test-infra/s3_cache.py download rubygems; fi" failed and exited with 1 during .

@jplehmann
Copy link

@kkirsche thanks so much for the fast fix! That did solve the problem with the search input, although the border around buttons on the right look a little off -- this may be next to impossible to address. But this is acceptable to me.

screen shot 2015-08-18 at 9 21 49 am

For me the buttons on the right looked even worse, but I don't really need highlighting on those as much so I turned it off.

        #search-submit:focus, .advanced-search-button:focus {
          outline:0px !important;
          -webkit-appearance:none;
          box-shadow: none;
        }
    }

@kkirsche
Copy link
Contributor Author

Essentially, if they are the same z-index the first item will not have the right focus. If the input is higher, the input will always have all sections of focus while the button will have 3. Vice versa, if the button is highest, the button will always have 4 but the input will always have 3

@cvrebert
Copy link
Collaborator

Filed bug regarding Travis error: #17011

@kkirsche
Copy link
Contributor Author

Travis error fixed via: #17012

@kkirsche
Copy link
Contributor Author

Travis restart

@cvrebert
Copy link
Collaborator

Won't do any good. You'd need to rebase to pick up the updated .travis.yml

@kkirsche
Copy link
Contributor Author

@cvrebert good point. Just rebased to pull that in

@mdo mdo added this to the v3.3.6 milestone Aug 23, 2015
@MohammadYounes
Copy link
Contributor

I think you also need this to address the button focus:

.input-group-btn:last-child > .btn:focus {
    z-index: 3;
}

input-group-btn-focus

@MohammadYounes
Copy link
Contributor

Or better, only the focused element should get a higher z-index:

.input-group .form-control:focus, .input-group-btn > .btn:focus {
    z-index: 3;
}

http://jsbin.com/cediwiqiko/2/edit?html,css,output

@mdo
Copy link
Member

mdo commented Nov 9, 2015

Looking at this again, I do believe we'd need to limit the z-index increase to be on focus for buttons and inputs, so we don't cause another bug for the buttons being behind on focus. Maybe that's already handled elsewhere though? It's been awhile since I looked at this 😁.

@mdo
Copy link
Member

mdo commented Nov 15, 2015

Proper fix on focus coming in #18253.

@mdo mdo closed this Nov 15, 2015
@mdo mdo removed this from the v3.3.6 milestone Nov 15, 2015
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 this pull request may close these issues.

Border color for input group on focus highlighted unevenly on right
5 participants