aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2023-11-15 13:39:44 -0800
committerPinapelz <yukais@pinapelz.com>2023-11-15 13:39:44 -0800
commit27b28d6507712f00ced4abbe7e026a12d47649f7 (patch)
tree64f833de7e936ab263706a0a0f42378f3264a7cf
parent637a1d974039274aef826b4f78f9d221e4dde3b2 (diff)
fix: don't allow scrubbing with arrows if input focused
-rw-r--r--src/app/page.tsx2
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;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage