From 3750b9055493187c728cbe8d2560c6e82abb38e6 Mon Sep 17 00:00:00 2001 From: Reshma <70228821+TheReshma@users.noreply.github.com> Date: Sat, 16 Apr 2022 06:47:04 +0530 Subject: [PATCH] Make email fields less space sensitive (#8341) * Added an if to check if it is the email field * Reverted the last change * Added an if to check if its email field --- src/components/structures/auth/ForgotPassword.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/structures/auth/ForgotPassword.tsx b/src/components/structures/auth/ForgotPassword.tsx index 58b0073c44..911ee5d1b9 100644 --- a/src/components/structures/auth/ForgotPassword.tsx +++ b/src/components/structures/auth/ForgotPassword.tsx @@ -222,8 +222,10 @@ export default class ForgotPassword extends React.Component { } private onInputChanged = (stateKey: string, ev: React.FormEvent) => { + let value = ev.currentTarget.value; + if (stateKey === "email") value = value.trim(); this.setState({ - [stateKey]: ev.currentTarget.value, + [stateKey]: value, } as any); };