1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-25 11:42:30 +01:00

fix enter causing issues in forms

This commit is contained in:
Puyodead1 2023-12-08 13:13:53 -05:00
parent 04a5cf600d
commit cfc29509f7
No known key found for this signature in database
GPG Key ID: BA5F91AAEF68E5CE
3 changed files with 24 additions and 3 deletions

View File

@ -252,7 +252,14 @@ function CreateInviteModal(props: InviteModalProps) {
</ModalHeader>
<ModelContentContainer>
<form>
<form
onKeyDown={(e) => {
if (e.key === "Enter") {
e.preventDefault();
onSubmit();
}
}}
>
<InputContainer>
<LabelWrapper error={false}>
<InputLabel>Expire after</InputLabel>

View File

@ -203,7 +203,14 @@ function CreateServerModal(props: AnimatedModalProps) {
</IconContainer>
</UploadIcon>
<form>
<form
onKeyDown={(e) => {
if (e.key === "Enter") {
e.preventDefault();
onSubmit();
}
}}
>
<InputContainer>
<LabelWrapper error={!!errors.name}>
<InputLabel>Guild Name</InputLabel>

View File

@ -121,7 +121,14 @@ function JoinServerModal(props: AnimatedModalProps) {
</ModalHeader>
<ModelContentContainer>
<form>
<form
onKeyDown={(e) => {
if (e.key === "Enter") {
e.preventDefault();
onSubmit();
}
}}
>
<InviteInputContainer>
<LabelWrapper error={!!errors.code}>
<InputLabel>Invite Link</InputLabel>