Escape doesn't close the composer's emoji/sticker board in any browser (focus starts in its search field) #304

Closed
opened 2026-10-04 21:36:12 -04:00 by jared · 0 comments
Owner

Opening the composer's emoji board puts focus in its Search field, and Escape doesn't close the board. Only a click outside does. Verified in Chromium, Firefox and WebKit (Playwright): focus=INPUT Search, openAfterEscape=true, openAfterOutsideClick=false.

Why: EmojiBoard's FocusTrap uses escapeDeactivates: stopPropagation (src/app/components/emoji-board/EmojiBoard.tsx:615). stopPropagation (src/app/utils/keyboard.ts:36) returns false whenever focus is in an input, so Escape is ignored while focus is in the search field, which is exactly where the board puts it. This is upstream Cinny's code, unchanged, so it's probably an upstream behaviour that Lotus inherits.

Fix: let Escape close the board even from its search field, e.g. escapeDeactivates: () => true for this trap, or clear the query on the first Escape and close on the second. Then check the sticker and GIF boards, which share the component.

(First filed as Safari-only; the later Chromium and Firefox checks showed it happens everywhere.)


Found in the October 2026 client audit (Playwright against a local Synapse + LiveKit stack, plus code reading). Code refs are at cinny 30e2dbcd, cinny-desktop 8f67ec7, element-call 3b0050e8.

Opening the composer's emoji board puts focus in its **Search** field, and **Escape doesn't close the board**. Only a click outside does. Verified in **Chromium, Firefox and WebKit** (Playwright): `focus=INPUT Search`, `openAfterEscape=true`, `openAfterOutsideClick=false`. **Why:** `EmojiBoard`'s FocusTrap uses `escapeDeactivates: stopPropagation` (src/app/components/emoji-board/EmojiBoard.tsx:615). `stopPropagation` (src/app/utils/keyboard.ts:36) returns `false` whenever focus is in an input, so Escape is ignored while focus is in the search field, which is exactly where the board puts it. This is upstream Cinny's code, unchanged, so it's probably an upstream behaviour that Lotus inherits. **Fix:** let Escape close the board even from its search field, e.g. `escapeDeactivates: () => true` for this trap, or clear the query on the first Escape and close on the second. Then check the sticker and GIF boards, which share the component. (First filed as Safari-only; the later Chromium and Firefox checks showed it happens everywhere.) --- _Found in the October 2026 client audit (Playwright against a local Synapse + LiveKit stack, plus code reading). Code refs are at cinny `30e2dbcd`, cinny-desktop `8f67ec7`, element-call `3b0050e8`._
jared added the bugpriority: lowarea: messaging labels 2026-10-04 21:36:12 -04:00
jared changed title from Safari/WebKit: Escape doesn't close the composer's emoji/sticker board to Escape doesn't close the composer's emoji/sticker board in any browser (focus starts in its search field) 2026-10-04 21:43:32 -04:00
jared closed this issue 2026-10-18 00:27:07 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#304