change(ui): don't trigget player actions while input field is focused

This commit is contained in:
sylenien 2022-10-10 13:45:55 +02:00
parent bb09e7f2ed
commit 98151b1d03

View file

@ -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();
}