mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-08-20 05:21:44 +10:00
fix(agent): keep the chat composer focused while streaming
Disabling the textarea for the duration of a response made the browser blur it, so the caret left the composer on every send and had to be clicked back. send() already ignores calls mid-stream, so Enter stays a no-op and type-ahead works.
This commit is contained in:
@@ -1079,7 +1079,9 @@ function AgentChatComposer({
|
||||
<Textarea
|
||||
value={input}
|
||||
rows={1}
|
||||
disabled={isReadOnly || isStreaming}
|
||||
// Not disabled while streaming: the browser blurs a disabled field, so the caret would
|
||||
// jump out of the composer on every send. `send` already ignores calls mid-stream.
|
||||
disabled={isReadOnly}
|
||||
onChange={(event) => onInputChange(event.target.value)}
|
||||
onKeyDown={(event) => {
|
||||
if (event.nativeEvent.isComposing) return;
|
||||
|
||||
Reference in New Issue
Block a user