gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Branchmainc1b153c4Merge branch 'records-1124c' into mainJukeboxmain/reports/JB3b-keyboard-gap.md

1.7 KB

  1. # Hybriel gap: a keydown handler in the parent makes the child's audio element load its source again
  2. Where: components/main.hl of the jukebox (the shell); it composes MediaPlayer (components/media-player) with `src = nowSrc`. A song is playing (currentTime about 3 s).
  3. What happens: any keydown that reaches a handler written in the shell makes the audio element fire emptied, loadstart and, because autoPlay is 'true', play again: the song restarts at 0.
  4. It does not matter where the handler sits (`document.addEventListener('keydown', (k) => ...)` inside a mount handler, `on keydown(e)` on body, `on keydown(e)` on the app div), whether it emits the key event or a plain string, or whether the handler does anything: `emit jbKey('none')` with a handler that only returns null is enough.
  5. Clicks, pointer events and a timer's `emit jbTick()` in the same shell do not do it. Without any keydown listener a key press changes nothing.
  6. Measured with CDP (listeners for emptied, loadstart, play, pause, seeking on the audio element; Input.dispatchKeyEvent for the key x): [emptied, loadstart, play] after one key.
  7. Probably the shell re-applies the child's `src` prop after a keydown handler although nothing changed (setting the src attribute again loads the element again).
  8. To reproduce in the jukebox: add to the View of components/main.hl `body { on keydown(e) { emit jbKey(e) } ... }` and `on jbKey(e) { return null }`, start a song, press any key.
  9. The keyboard code that was tried: actions space (play / pause), ArrowLeft / ArrowRight (10 s), n (next), p (previous), Escape (close the overlay), ignored in input, textarea and select fields.
  10. Next step for a fresh worker: build the minimal repro app (a parent with an audio-playing child and an `on keydown(e)` that returns) and report it to hybriel.

Branches

Latest commits

  • c1b153c4Merge branch 'records-1124c' into mainJukebox
  • d7b5e780|||PR Records 2026-11-24 (2): live day72, PR #19 merge, #10 newsmre
  • 43b564dbMerge branch 'records-1124b' into mainJukebox
  • fa86b08c|||PR Records 2026-11-24: LOG, STATUS, missions 020-023mre
  • 0a2ae3daMerge remote-tracking branch 'origin/records-1123' into records-1124mre
  • 9a48cfcaMerge branch 'vendor-theme' into mainJukebox
  • 170d3735Merge branch 'code-order-2' into mainJukebox
  • 3f1918a7|||PR Re-sync layouts theme 4099e64 with Segoe UI firstmre
  • 2e7f6a43Vendor virtual-list 489afcf from components.hybrielmre
  • 0ba85799Merge branch 'reset-classes' into mainJukebox
  • 502eeed5jukebox#20: vendor virtual-list initial resetKey baseline fixmre
  • 6d5ce287|||PR jukebox#9 Centralize songs table reads and writes in db.hlmre
  • dcca21abjukebox#8 Move copies and queue logic into their topicsmre
  • 3b76651cjukebox#20: update virtual-list README pin and resetKey optionsmre
  • bc09e1e8|||PR jukebox#20: reset virtual lists through resetKey (partial validation)mre
  • a3796dc5Records: live step waits for idlemre
  • 3b158e16Records: merges of #9 and #11mre
  • 27204167Merge main into records-1123mre
  • 10f8a8c8Merge branch 'code-order' into mainJukebox
  • 204fc828Merge branch 'day72' into mainJukebox