From cec76e00463d77a731307a0e6e7a2a58cc95d511 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Thu, 13 Feb 2020 18:49:44 +0000 Subject: [PATCH] fix: fixes autofill issues in chrome (#2837) --- .../routes/Configure/sections/Auth/ClientSecretField.tsx | 1 + .../client/admin/routes/Configure/sections/Email/SMTP.tsx | 1 + .../routes/Configure/sections/Moderation/APIKeyField.tsx | 5 +++-- .../admin/test/configure/__snapshots__/auth.spec.tsx.snap | 6 +++--- .../test/configure/__snapshots__/moderation.spec.tsx.snap | 8 ++++---- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/core/client/admin/routes/Configure/sections/Auth/ClientSecretField.tsx b/src/core/client/admin/routes/Configure/sections/Auth/ClientSecretField.tsx index dcd75bc4c..7b096a1ff 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/ClientSecretField.tsx +++ b/src/core/client/admin/routes/Configure/sections/Auth/ClientSecretField.tsx @@ -33,6 +33,7 @@ const ClientSecretField: FunctionComponent = ({ {...input} id={input.name} disabled={disabled || meta.submitting} + autoComplete="new-password" // TODO: (wyattjoh) figure out how to add translations to these props hidePasswordTitle="Show Client Secret" showPasswordTitle="Hide Client Secret" diff --git a/src/core/client/admin/routes/Configure/sections/Email/SMTP.tsx b/src/core/client/admin/routes/Configure/sections/Email/SMTP.tsx index b1c37d34f..de59155d8 100644 --- a/src/core/client/admin/routes/Configure/sections/Email/SMTP.tsx +++ b/src/core/client/admin/routes/Configure/sections/Email/SMTP.tsx @@ -162,6 +162,7 @@ const SMTP: FunctionComponent = ({ disabled }) => ( {...input} id={input.name} disabled={disabled || !enabled} + autoComplete="new-password" fullWidth color={colorFromMeta(meta)} /> diff --git a/src/core/client/admin/routes/Configure/sections/Moderation/APIKeyField.tsx b/src/core/client/admin/routes/Configure/sections/Moderation/APIKeyField.tsx index 2e3cb8968..bb87ba983 100644 --- a/src/core/client/admin/routes/Configure/sections/Moderation/APIKeyField.tsx +++ b/src/core/client/admin/routes/Configure/sections/Moderation/APIKeyField.tsx @@ -32,9 +32,10 @@ const APIKeyField: FunctionComponent = ({ {...input} id={`configure-moderation-${input.name}`} disabled={disabled} + autoComplete="new-password" // TODO: (wyattjoh) figure out how to add translations to these props - hidePasswordTitle="Show API Key" - showPasswordTitle="Hide API Key" + hidePasswordTitle="Hide API Key" + showPasswordTitle="Show API Key" color={colorFromMeta(meta)} fullWidth /> diff --git a/src/core/client/admin/test/configure/__snapshots__/auth.spec.tsx.snap b/src/core/client/admin/test/configure/__snapshots__/auth.spec.tsx.snap index 53fd365c0..2e271fc2b 100644 --- a/src/core/client/admin/test/configure/__snapshots__/auth.spec.tsx.snap +++ b/src/core/client/admin/test/configure/__snapshots__/auth.spec.tsx.snap @@ -869,7 +869,7 @@ needs to be displayed, e.g. “Log in with <Facebook>”. >