-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[TextField][ variant=filled|outlined] can not click label to get input field focus (v3.1.1) #12997
Comments
https://github.com/mui-org/material-ui/blob/7d2fadfc7b90c958d10ef89a0a3ce58cc7ff939e/packages/material-ui/src/InputLabel/InputLabel.js#L41-L46 |
@TheRealArlie You can workaround the problem by providing an id (it will link the input with the label). I'm also worried about the hover state to being applied. |
Ok, I had a look at the MCW and vuetify implementations. They are both solving the problem with @TheRealArlie Do you want to work on this? :) |
@oliviertassinari That is very often an immediate turn of for me if I can't select text on a website. Can't we revisit the original fix for firefox autofill and make it right? |
@eps1lon It's because the input doesn't overlap the label in the "standard" variant.
I'm out of options here. If you see a better way I would love to learn it. |
Hey @oliviertassinari is it cool if I work on this? I'll try looking to see if there's a better solution. |
So it seems like your right, the default behavior on the original TextField wouldn't allow users from selecting the label text anyways. But either way the label text can be selected by dragging the cursor from outside the element over into the input. |
+1 Maybe try "pointer-events: none;" on label in PR? |
@byronluk Yes, please go ahead :) |
Expected Behavior
Clicking the label should give the input focus to the underlying input field.
Current Behavior
Clicking the label only marks the label text.
Steps to Reproduce
Link: https://codesandbox.io/s/o5qyjywl35
Context
I tried to use the new outlined variant of the TextField component.
Your Environment
The text was updated successfully, but these errors were encountered: