In-iframe PTT/deafen key listeners are lost if the EC iframe reloads #60

Closed
opened 2026-09-12 01:51:20 -04:00 by jared · 0 comments
Owner

Severity: low · Type: bug · Confidence: medium

Location: src/app/features/call/CallControls.tsx:170,220-232,265-267

Problem

both key effects attach listeners to callEmbed.iframe.contentWindow captured once at effect setup, and the effects only re-run on [pttMode, pttKey, callEmbed] / [callEmbed, deafenKey]. Listeners registered on a window are discarded when that window navigates to a new document, so after any EC-side reload (crash recovery, an in-widget navigation) the PTT and deafen keys stop working while focus is inside the iframe — which is most of the time during a call — with no error. The host-window bindings keep working, so it fails silently and inconsistently.

How to trigger

join a call, confirm PTT works with focus in the video area, force the EC iframe to reload, then try PTT with focus in the iframe.

Suggested fix

re-attach the iframe listeners from an iframe.onload/load listener (or subscribe via the widget transport instead of raw DOM events). Marked medium confidence because forcing an EC reload requires a live call.


Filed from the September 2026 client audit (branch lotus @ 4bea4895).

**Severity:** low · **Type:** bug · **Confidence:** medium **Location:** `src/app/features/call/CallControls.tsx:170,220-232,265-267` ### Problem both key effects attach listeners to `callEmbed.iframe.contentWindow` captured once at effect setup, and the effects only re-run on `[pttMode, pttKey, callEmbed]` / `[callEmbed, deafenKey]`. Listeners registered on a window are discarded when that window navigates to a new document, so after any EC-side reload (crash recovery, an in-widget navigation) the PTT and deafen keys stop working *while focus is inside the iframe* — which is most of the time during a call — with no error. The host-window bindings keep working, so it fails silently and inconsistently. ### How to trigger join a call, confirm PTT works with focus in the video area, force the EC iframe to reload, then try PTT with focus in the iframe. ### Suggested fix re-attach the iframe listeners from an `iframe.onload`/`load` listener (or subscribe via the widget transport instead of raw DOM events). Marked medium confidence because forcing an EC reload requires a live call. --- --- _Filed from the September 2026 client audit (branch `lotus` @ 4bea4895)._
jared added this to the Audit 2026-09 · Medium & Low milestone 2026-09-12 01:51:20 -04:00
jared added the bugpriority: lowarea: calls labels 2026-09-12 01:51:20 -04:00
jared self-assigned this 2026-09-12 01:51:20 -04:00
jared closed this issue 2026-09-12 19:46:14 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#60