Skip to content

Commit 053689f

Browse files
authored
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.
1 parent bb9c36b commit 053689f

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
@@ -57,7 +57,8 @@
5757
// same selector as the IE ones, otherwise Safari will ignore it.
5858
&::-webkit-contacts-auto-fill-button,
5959
&::-webkit-caps-lock-indicator,
60-
&::-webkit-credentials-auto-fill-button {
60+
// Preserve the autofill icon on password inputs since it includes some important functionality.
61+
&:not([type='password'])::-webkit-credentials-auto-fill-button {
6162
visibility: hidden;
6263
}
6364

0 commit comments

Comments
 (0)