From e67c4246d4f1c01ab4d440aed7090a9e8007d25c Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Mon, 6 Sep 2021 06:40:24 +0200 Subject: [PATCH] fix(material/input): preserve password autofill icon 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. --- src/material/form-field/form-field-input.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/material/form-field/form-field-input.scss b/src/material/form-field/form-field-input.scss index 2646d3463e00..9b2eaac25a7e 100644 --- a/src/material/form-field/form-field-input.scss +++ b/src/material/form-field/form-field-input.scss @@ -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; }