From e243fad1ba6642b304d52dfa3fb507e2225685e9 Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Mon, 9 Nov 2020 14:04:44 +1100 Subject: [PATCH] [MISC] Disable auto capitalization of username field on mobile (#1435) --- web/src/components/FixedTextField.tsx | 3 ++- web/src/views/LoginPortal/FirstFactor/FirstFactorForm.tsx | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/components/FixedTextField.tsx b/web/src/components/FixedTextField.tsx index a0c8c8c1..5e9c0f3b 100644 --- a/web/src/components/FixedTextField.tsx +++ b/web/src/components/FixedTextField.tsx @@ -16,7 +16,8 @@ const FixedTextField = function (props: TextFieldProps) { classes: { root: style.label } - }}> + }} + inputProps={{autoCapitalize: props.autoCapitalize}}> {props.children} ); diff --git a/web/src/views/LoginPortal/FirstFactor/FirstFactorForm.tsx b/web/src/views/LoginPortal/FirstFactor/FirstFactorForm.tsx index d5605f2e..6529676a 100644 --- a/web/src/views/LoginPortal/FirstFactor/FirstFactorForm.tsx +++ b/web/src/views/LoginPortal/FirstFactor/FirstFactorForm.tsx @@ -94,6 +94,7 @@ const FirstFactorForm = function (props: Props) { fullWidth onChange={v => setUsername(v.target.value)} onFocus={() => setUsernameError(false)} + autoCapitalize="none" onKeyPress={(ev) => { if (ev.key === 'Enter') { if (!username.length) {