From 886522ccd5039baa68dbaf2cffc5841664bee68d Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Fri, 10 Sep 2021 14:04:19 +0200 Subject: [PATCH] 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 053689f1d15845d0d59f881f6c29018e2e3f8c46) --- 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 827f4e59caf8..3e7c3b026368 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; }