Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

In multiple text fields, you have to press TAB key twice to navigate to next field #458

Closed
sanfilippopablo opened this issue Oct 21, 2014 · 3 comments

Comments

@sanfilippopablo
Copy link

You can see the behavior right here: https://material.angularjs.org/#/demo/material.components.textField. If you have focus on a field, pressing tab should navigate to the next one. Instead, it set focus on the label element (i'm almost sure). So, you have to press TAB key twice to navigate to the next text field.

@shadowmaru
Copy link

I've played around with a login form I have and had this issue.

Maybe the problem is that both input groups and inputs have tabindex. The only case that it worked was when I set the first md-input-group's to tabindex="0" and the second one to tabindex="1"

Any ideas on how to fix this in the directives?

@christopherlakey
Copy link

It looks like the outer md-input-group is focus enabled (tabindex=0) so that it also gets focus in addition to the inner input element.

Setting the tabindex on the md-text-float doesn't affect the inner input, so you can set it to -1 to disable the outer element from taborder.

@marcysutton
Copy link
Contributor

Yep, there's an extra tabIndex in there. I'll take a closer look at this and improve the experience. Thanks for reporting it!

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

No branches or pull requests

4 participants