You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-04 11:51:45 +03:00
Merge pull request #5566 from 2580ayush2580/ayush25803
Fix "Continuing without email" dialog bug
This commit is contained in:
@@ -44,7 +44,8 @@ const RegistrationEmailPromptDialog: React.FC<IProps> = ({onFinished}) => {
|
|||||||
const [email, setEmail] = useState("");
|
const [email, setEmail] = useState("");
|
||||||
const fieldRef = useRef<Field>();
|
const fieldRef = useRef<Field>();
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async (e) => {
|
||||||
|
e.preventDefault();
|
||||||
if (email) {
|
if (email) {
|
||||||
const valid = await fieldRef.current.validate({ allowEmpty: false });
|
const valid = await fieldRef.current.validate({ allowEmpty: false });
|
||||||
|
|
||||||
@@ -73,6 +74,7 @@ const RegistrationEmailPromptDialog: React.FC<IProps> = ({onFinished}) => {
|
|||||||
<form onSubmit={onSubmit}>
|
<form onSubmit={onSubmit}>
|
||||||
<Field
|
<Field
|
||||||
ref={fieldRef}
|
ref={fieldRef}
|
||||||
|
autoFocus={true}
|
||||||
type="text"
|
type="text"
|
||||||
label={_t("Email (optional)")}
|
label={_t("Email (optional)")}
|
||||||
value={email}
|
value={email}
|
||||||
|
|||||||
Reference in New Issue
Block a user