@devries-cameron20 / t3code-1 / commits / a30cb3283a
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): Esc in the keybindings search clears it without closing Settings (#35161)

Julius Marminge committed Nov 12, 2026 at 03:07 UTC a30cb3283a0f8d90dc342de129240fbbaf191b02
2 files changed +23 -2
apps/web/src/components/settings/KeybindingsSettings.browser.test.tsx
+19
@@ -105,6 +105,25 @@ describe("Esc in a shortcut recorder", () => {
105 });
106 });
107
108 +it("Esc in the keybindings search clears the query without closing Settings", async () => {
109 + const onOpenChange = vi.fn();
110 + await using _screen = await render(
111 + <Dialog open onOpenChange={onOpenChange}>
112 + <DialogPopup>
113 + <DialogTitle>Settings</DialogTitle>
114 + <KeybindingsSettingsPanel />
115 + </DialogPopup>
116 + </Dialog>,
117 + );
118 + const search = page.getByRole("searchbox", { name: "Search keybindings" });
119 + await search.fill("sidebar");
120 +
121 + await userEvent.keyboard("{Escape}");
122 +
123 + await expect.element(search).toHaveValue("");
124 + expect(onOpenChange).not.toHaveBeenCalled();
125 +});
126 +
127 it("re-enables Save when a When editor closes on an expression it could not parse", async () => {
128 await using screen = await render(
129 <RegistryProvider>
apps/web/src/components/settings/KeybindingsSettings.tsx
+4 -2
@@ -132,8 +132,10 @@ function KeybindingsSearchInput({
132 onKeyDown={(event) => {
133 if (event.key !== "Escape") return;
134 event.preventDefault();
135 - if (query.length > 0) onChange("");
136 - else event.currentTarget.blur();
135 + if (query.length > 0) {
136 + event.stopPropagation();
137 + onChange("");
138 + } else event.currentTarget.blur();
139 }}
140 placeholder="Search keybindings"
141 aria-label="Search keybindings"