-
Notifications
You must be signed in to change notification settings - Fork 942
Clicking on padding around text field no longer focuses input #5774
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
Comments
Also started to happen for us now, have not found any workaround. |
Chrome 132 appears to be the last working version, meaning 133 is what broke it. Now we just have to figure out if this was an intentional breaking change or a regression. My first thought was this: https://chromestatus.com/feature/5134341540413440 |
Adding .input-wrapper {
display: flex;
user-select: none;
} When empty it focuses the input as expected, however if it is not empty the text is still selected. I'm unsure if this is the best approach to solving the problem, but I thought I'd share what I had found so far. |
I've reported the regression to Chromium: https://issues.chromium.org/issues/400317114 |
@austinw-fineart Found something interesting while playing with your codepen. If the input has some value, clicking on green padding will actually shift the focus to input. Strange! Same behaviour is seen with example instances on https://material-web.dev/components/text-field |
What is affected?
Accessibility, Component
Description
When I click on the inner padding around the input inside of a text field I expect it to focus on the input.
However, the focus is on the field itself leaving either the input unselected if it's empty or fully selected if it's not, like you tabbed into it.
It's possible this change in behavior was caused by a browser update as the current version of Firefox (135) does not exhibit this behavior and I do not recall older versions of Chrome doing this either but I don't know which version specifically.
Reproduction
https://material-web.dev/components/text-field/
Workaround
I have not found a workaround.
Is this a regression?
Yes. This used to work, but now it doesn't.
Affected versions
Failing in 2.2.0, worked in 2.2.0
Browser/OS/Node environment
Browser: Chrome 133.0.6943.127
OS: Windows 11
Node version: 22.13.1
npm version: 11.1.0
The text was updated successfully, but these errors were encountered: