From 98151b1d03803fc72bea4398885142130ae6f35d Mon Sep 17 00:00:00 2001 From: sylenien Date: Mon, 10 Oct 2022 13:45:55 +0200 Subject: [PATCH] change(ui): don't trigget player actions while input field is focused --- .../Session_/Player/Controls/components/PlayerControls.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx b/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx index 3adc37502..f2f52fd7b 100644 --- a/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx +++ b/frontend/app/components/Session_/Player/Controls/components/PlayerControls.tsx @@ -52,6 +52,9 @@ function PlayerControls(props: Props) { React.useEffect(() => { const handleKeyboard = (e: KeyboardEvent) => { + if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) { + return; + } if (e.key === 'ArrowRight') { arrowForwardRef.current.focus(); }