gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitb011f98eb011f98eRecords: style form live on day35mreb011f98e/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

  • b011f98eRecords: style form live on day35mre
  • 60d90cb2Records: L1 woken for the restartmre
  • 75ae544fRecords: restart waits for the connection to closemre
  • e0b75951Records: L1 merged and pushed, restart waits for an open connectionmre
  • f2b5db98styles: format styles with nested rules and bare queriesmre
  • f036bab4search: format styles with nested rules and bare queriesmre
  • ef9a9d4asongs: format styles with nested rules and bare queriesmre
  • f22f9aacmain: format styles with nested rules and bare queriesmre
  • f56cd7c7Sync icons from 8176eb1 and verify mixed component sourcesmre
  • d56e5054Sync theme and shared tokens from layouts 17e0f03mre
  • b1362547Re-vendor to Hybriel set day35mre
  • 89e10f08Records: mission 002 rollback wordingmre
  • 9485dee7Records: mission 002 brief (live step)mre
  • 9ba68fe7Records: S1b reviewedmre
  • 193dfff1Records: S1 result, S1b startedmre
  • 028ed776Records: mission 001 continuation S1bmre
  • 1838d7e8Records: S1 startedmre
  • a43fca3fRecords: mission 001 decided pointsmre
  • 41773828Records: statusmre
  • a82c0805Records: mission 001 brief (Style form)mre