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.

(cherry picked from commit 053689f)
  • Loading branch information
crisbeto authored and andrewseguin committed Sep 10, 2021
1 parent b12018a commit 886522c
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 @@ -63,7 +63,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 886522c

Please sign in to comment.