From 991fd854d3642be5944456da951306fed50c74f0 Mon Sep 17 00:00:00 2001 From: ethan Date: Tue, 16 Dec 2025 14:33:21 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20fix:=20prevent=20Escape=20from?= =?UTF-8?q?=20interrupting=20stream=20during=20voice=20recording?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When recording voice input while streaming, pressing Escape to cancel recording would also interrupt the active chat stream. This is the same issue fixed in PR #954 (workspace renaming) and PR #1010 (message editing). Added `stopPropagation()` to the Escape handler in `useVoiceInput.ts` to prevent the event from reaching the global stream interrupt handler in `useAIViewKeybinds`. Closes #1170 --- _Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking: `high`_ --- src/browser/hooks/useVoiceInput.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/browser/hooks/useVoiceInput.ts b/src/browser/hooks/useVoiceInput.ts index fa72679ac3..693b664037 100644 --- a/src/browser/hooks/useVoiceInput.ts +++ b/src/browser/hooks/useVoiceInput.ts @@ -335,6 +335,7 @@ export function useVoiceInput(options: UseVoiceInputOptions): UseVoiceInputResul stop({ send: true }); } else if (e.key === "Escape") { e.preventDefault(); + e.stopPropagation(); // Prevent global stream interrupt handler cancel(); } else if (matchesKeybind(e, KEYBINDS.TOGGLE_VOICE_INPUT)) { e.preventDefault();