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:
parent
04a5cf600d
commit
cfc29509f7
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user