Skip to content

Commit 886522c

Browse files
crisbetoandrewseguin
authored andcommitted
fix(material/input): preserve password autofill icon (#23534)
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)
1 parent b12018a commit 886522c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/material/form-field/form-field-input.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
// same selector as the IE ones, otherwise Safari will ignore it.
6464
&::-webkit-contacts-auto-fill-button,
6565
&::-webkit-caps-lock-indicator,
66-
&::-webkit-credentials-auto-fill-button {
66+
// Preserve the autofill icon on password inputs since it includes some important functionality.
67+
&:not([type='password'])::-webkit-credentials-auto-fill-button {
6768
visibility: hidden;
6869
}
6970

0 commit comments

Comments
 (0)