Commit b7e7f0d
authored
🤖 fix: prevent Escape from interrupting stream during voice recording (#1184)
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`.
I explored ways to unify this pattern (centralized Escape registry,
checking `defaultPrevented`, single global handler with state checks)
but none were better than the simple `stopPropagation()` approach—each
adds coupling or complexity without meaningful benefit. The DOM's event
propagation model is designed for exactly this case.
Closes #1170
---
_Generated with `mux`1 parent 01e48c6 commit b7e7f0d
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
338 | 339 | | |
339 | 340 | | |
340 | 341 | | |
| |||
0 commit comments