Skip to content

Conversation

@devversion
Copy link
Member

If a form-field value is set through autofill, the floating placeholder should float and not overlay the form-field value. This doesn't work in Chrome because the .mat-form-field-autofill-float class doesn't exist and can't be set on the form-field control anyway.

image

Fixes #6837

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 5, 2017
}
}

.mat-form-field-autofill-float:-webkit-autofill + .mat-form-field-placeholder,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you instead just add the mat-form-field-autofill-float class to the MdInput? This was intended as a class users could add to custom a MdFormFieldControl to get the same effect, but I forgot to actually add it, haha...

Copy link
Member Author

@devversion devversion Sep 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't that involve injecting the parent MdFormField to see if the floating placeholder is enabled or not? (which might not be wrong; just asking)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed discussed feedback from Slack.

@mmalerba mmalerba added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Sep 5, 2017
If a form-field value is set through autofill, the floating placeholder should float and not overlay the form-field value. This doesn't work in Chrome because the `.mat-form-field-autofill-float` class doesn't exist and can't be set on the form-field control anyway.

Fixes angular#6837
@devversion devversion force-pushed the fix/form-field-autofill-float branch from c4d9aa2 to 0e592b3 Compare September 12, 2017 08:59
@devversion devversion added the P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful label Sep 15, 2017
@jelbourn jelbourn merged commit 602a861 into angular:master Sep 20, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Password-field placeholder doesnt rise when Chrome autofills password-field after beta.10

4 participants