Revert "Fix: IME composition preventing message sending in chat"
This commit is contained in:
@@ -1129,7 +1129,7 @@ const UserMessageComponent = ({ chatMessage, messageIdx, isCheckpointGhost, curr
|
||||
if (e.key === 'Escape') {
|
||||
onCloseEdit()
|
||||
}
|
||||
if (e.key === 'Enter' && !e.shiftKey && !(e.nativeEvent as any).isComposing) {
|
||||
if (e.key === 'Enter' && !e.shiftKey) {
|
||||
onSubmit()
|
||||
}
|
||||
}
|
||||
@@ -3056,7 +3056,7 @@ export const SidebarChat = () => {
|
||||
setInstructionsAreEmpty(!newStr)
|
||||
}, [setInstructionsAreEmpty])
|
||||
const onKeyDown = useCallback((e: KeyboardEvent<HTMLTextAreaElement>) => {
|
||||
if (e.key === 'Enter' && !e.shiftKey && !(e.nativeEvent as any).isComposing) {
|
||||
if (e.key === 'Enter' && !e.shiftKey) {
|
||||
onSubmit()
|
||||
} else if (e.key === 'Escape' && isRunning) {
|
||||
onAbort()
|
||||
|
||||
Reference in New Issue
Block a user