Skip to content

Commit

Permalink
fix(material/input): preserve password autofill icon (#23534)
Browse files Browse the repository at this point in the history
By default we hide all browser decorations from the input, because they don't usually work well with Material.

These changes exclude the password autofill from password inputs, because it has some UX and security implications, and password inputs don't have any other decorations anyway.

Fixes #20639.
  • Loading branch information
crisbeto committed Sep 10, 2021
1 parent bb9c36b commit 053689f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/material/form-field/form-field-input.scss
Expand Up @@ -57,7 +57,8 @@
// same selector as the IE ones, otherwise Safari will ignore it.
&::-webkit-contacts-auto-fill-button,
&::-webkit-caps-lock-indicator,
&::-webkit-credentials-auto-fill-button {
// Preserve the autofill icon on password inputs since it includes some important functionality.
&:not([type='password'])::-webkit-credentials-auto-fill-button {
visibility: hidden;
}

Expand Down

0 comments on commit 053689f

Please sign in to comment.