From 27b28d6507712f00ced4abbe7e026a12d47649f7 Mon Sep 17 00:00:00 2001
From: Pinapelz <yukais@pinapelz.com>
Date: Wed, 15 Nov 2023 13:39:44 -0800
Subject: fix: don't allow scrubbing with arrows if input focused

---
 src/app/page.tsx | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'src/app/page.tsx')

diff --git a/src/app/page.tsx b/src/app/page.tsx
index 95196d2..4be028c 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -128,11 +128,13 @@ function KaraokePage() {
         handlePlayPause();
       }
       if (e.code === "ArrowRight") {
+        if (document.activeElement?.tagName === "INPUT") return;
         const video = videoRef.current;
         if (!video) return;
         video.currentTime += 5;
       }
       if (e.code === "ArrowLeft") {
+        if (document.activeElement?.tagName === "INPUT") return;
         const video = videoRef.current;
         if (!video) return;
         video.currentTime -= 5;
-- 
cgit v1.2.3

