Repository navigation
fix(web): Esc in theme search clears it without closing the dialog - #41764
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceProven in the real web app using scenarios:prove (exit 0). Chromium, 1280×800, light appearance, fresh synthetic project on each commit. Steps: Settings → Appearance → Add theme; type
Base failed because the search field disappeared after Escape; head passed all Escape assertions. Real IME composition was not exercised. Not shown:
|






In Settings → Appearance → Add theme, the "Search themes..." field had no Escape handling. With a query typed, Escape closed the whole "Add a theme" dialog instead of clearing the search. The field also used
type="search", which Chromium clears natively on Escape even while an IME is composing, despite the existing composition guard.Fix
The same pattern as #41616 and #41647, plus the held-key handling from #41692:
type="text"withrole="searchbox", so the browser no longer clears the field on its own.Repro (Linux, Chromium,
vp run dev --no-seed)nordinto the search field.After the fix, a second Escape closes "Add a theme" and leaves Settings open.
Verification
An AI agent ran each check below.
ThemeImportDialog.browser.test.tsxgains one case: the field istype="text", an IME Escape (both theisComposingand the SafarikeyCode 229shape) keepsnord, a real Escape clears it without closing, a held auto-repeat Escape does not close, and a second Escape closes. It fails on main and passes here (11/11,vp test run ... --maxWorkers=1).vp run check:changedpasses.Generated with Claude Opus 5.5 in T3 Code Nightly