-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix(text-field): Fix textarea-shape-radius mixin behavior for input #3982
Conversation
const firstFocusField = document.querySelector('.mdc-text-field--focused input, .mdc-text-field--focused textarea'); | ||
if (firstFocusField) { | ||
// Programmatically focus to get :focus applied | ||
firstFocusField.focus(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This'll make only the first element in the demo to have focus?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Only one element in the document can have focus at a time, but this is enough to test the textarea issue and I want to see how the screenshot tests come out to see if it can be useful for other text field pages as well.
Skipped 2 approvals due to spurious changes that need a re-run
d7e0c09
to
16c3a6f
Compare
Unfortunately, forcing focus in the screenshot tests is flake-prone, due at least in part to the blinking text cursor, so I'm leaving the screenshot tests unaltered. |
All 564 screenshot tests passed for commit c9b719f vs. |
All 564 screenshot tests passed for commit 317c0f1 vs. |
Includes the following patched changes material-components/material-components-web#3952 material-components/material-components-web#3982 material-components/material-components-web#3992 material-components/material-components-web#3993 material-components/material-components-web#3994 PiperOrigin-RevId: 219194917
Includes the following patched changes material-components/material-components-web#3952 material-components/material-components-web#3982 material-components/material-components-web#3992 material-components/material-components-web#3993 material-components/material-components-web#3994 PiperOrigin-RevId: 219194917
This fixes a gap which can end up appearing between the inner and outer elements of the textarea DOM. The style calculations were not taking into account the new radius types (e.g.
small
) and were also being skipped for single-value radius arguments.