Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

fix(text-field): Fix textarea-shape-radius mixin behavior for input #3982

Merged
merged 4 commits into from
Oct 24, 2018

Conversation

kfranqueiro
Copy link
Contributor

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.

@kfranqueiro kfranqueiro added this to the R20 (v0.41.0) milestone Oct 23, 2018
const firstFocusField = document.querySelector('.mdc-text-field--focused input, .mdc-text-field--focused textarea');
if (firstFocusField) {
// Programmatically focus to get :focus applied
firstFocusField.focus();
Copy link
Collaborator

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?

Copy link
Contributor Author

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
@kfranqueiro kfranqueiro force-pushed the fix/textarea-focus-shape branch from d7e0c09 to 16c3a6f Compare October 23, 2018 21:12
@kfranqueiro
Copy link
Contributor Author

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.

@mdc-web-bot
Copy link
Collaborator

All 564 screenshot tests passed for commit c9b719f vs. master! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 564 screenshot tests passed for commit 317c0f1 vs. master! 💯🎉

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

Successfully merging this pull request may close these issues.

4 participants