diff --git a/src/script/auth/component/JoinGuestLinkPasswordModal.tsx b/src/script/auth/component/JoinGuestLinkPasswordModal.tsx index 425a1556abf2..92418e0c90c0 100644 --- a/src/script/auth/component/JoinGuestLinkPasswordModal.tsx +++ b/src/script/auth/component/JoinGuestLinkPasswordModal.tsx @@ -45,7 +45,8 @@ const JoinGuestLinkPasswordModal: React.FC = ({ const {formatMessage: _} = useIntl(); const [passwordValue, setPasswordValue] = useState(''); - const onSubmit = () => { + const onSubmit = (event: React.FormEvent) => { + event.preventDefault(); onSubmitPassword(passwordValue); }; @@ -70,7 +71,7 @@ const JoinGuestLinkPasswordModal: React.FC = ({
) => onSubmit(event)} autoComplete="off" > = ({ block type="button" disabled={!passwordValue} - onClick={onSubmit} + onClick={(event: React.FormEvent) => onSubmit(event)} data-uie-name="guest-link-join-submit-button" > {_(joinGuestLinkPasswordModalStrings.joinConversation)}