From 88943ce1badd932c20f8f10c1640a0cd65da7a6f Mon Sep 17 00:00:00 2001 From: Luke Vella Date: Sat, 4 Jun 2022 09:13:01 +0100 Subject: [PATCH] Prevent submitting form from name field --- src/components/poll/desktop-poll/participant-row-form.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/poll/desktop-poll/participant-row-form.tsx b/src/components/poll/desktop-poll/participant-row-form.tsx index e868157f5..8bdc237d7 100644 --- a/src/components/poll/desktop-poll/participant-row-form.tsx +++ b/src/components/poll/desktop-poll/participant-row-form.tsx @@ -100,6 +100,12 @@ const ParticipantRowForm: React.ForwardRefRenderFunction< }, 100); } }} + onKeyPress={(e) => { + if (e.code === "Enter") { + e.preventDefault(); + checkboxRefs.current[0]?.focus(); + } + }} /> )}