Two complementary fixes: 1. Register the keydown handler on the capture phase. This ensures we run before the native HTML <video> element's built-in keyboard handler, so our preventDefault actually blocks the default seek. Without this, when focus was on the video, both handlers ran and the actual jump was the sum of both (±5 s ours + native = >1 min in some browsers). 2. Blur the video element on mouseup. After clicking the seekbar the video keeps keyboard focus, which made the symptom appear right after every scrub. Releasing focus on mouseup avoids that altogether. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| index.html | ||