mirror of
https://github.com/stackblitz/bolt.new
synced 2025-02-05 20:46:43 +00:00
Merge pull request #679 from Dlouxgit/main
fix: handle conflicts between input method engine and enter key in chatbox
This commit is contained in:
commit
4f02887565
@ -425,12 +425,15 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
if (isStreaming) {
|
if (isStreaming) {
|
||||||
handleStop?.();
|
handleStop?.();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// ignore if using input method engine
|
||||||
|
if (event.nativeEvent.isComposing) {
|
||||||
|
return
|
||||||
|
}
|
||||||
handleSendMessage?.(event);
|
handleSendMessage?.(event);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user