diff options
| author | Pinapelz <yukais@pinapelz.com> | 2023-11-15 13:39:44 -0800 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2023-11-15 13:39:44 -0800 |
| commit | 27b28d6507712f00ced4abbe7e026a12d47649f7 (patch) | |
| tree | 64f833de7e936ab263706a0a0f42378f3264a7cf | |
| parent | 637a1d974039274aef826b4f78f9d221e4dde3b2 (diff) | |
fix: don't allow scrubbing with arrows if input focused
| -rw-r--r-- | src/app/page.tsx | 2 |
1 files changed, 2 insertions, 0 deletions
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; |
