Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 3750b90

Browse files
authored
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
1 parent 11e0a3a commit 3750b90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/structures/auth/ForgotPassword.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,10 @@ export default class ForgotPassword extends React.Component<IProps, IState> {
222222
}
223223

224224
private onInputChanged = (stateKey: string, ev: React.FormEvent<HTMLInputElement>) => {
225+
let value = ev.currentTarget.value;
226+
if (stateKey === "email") value = value.trim();
225227
this.setState({
226-
[stateKey]: ev.currentTarget.value,
228+
[stateKey]: value,
227229
} as any);
228230
};
229231

0 commit comments

Comments
 (0)