mirror of
https://github.com/voideditor/void.git
synced 2026-10-12 02:24:20 +00:00
Merge pull request #797 from voideditor/revert-784-fix-ime-composition-chat
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') {
|
if (e.key === 'Escape') {
|
||||||
onCloseEdit()
|
onCloseEdit()
|
||||||
}
|
}
|
||||||
if (e.key === 'Enter' && !e.shiftKey && !(e.nativeEvent as any).isComposing) {
|
if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
|
||||||
onSubmit()
|
onSubmit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3056,7 +3056,7 @@ export const SidebarChat = () => {
|
|||||||
setInstructionsAreEmpty(!newStr)
|
setInstructionsAreEmpty(!newStr)
|
||||||
}, [setInstructionsAreEmpty])
|
}, [setInstructionsAreEmpty])
|
||||||
const onKeyDown = useCallback((e: KeyboardEvent<HTMLTextAreaElement>) => {
|
const onKeyDown = useCallback((e: KeyboardEvent<HTMLTextAreaElement>) => {
|
||||||
if (e.key === 'Enter' && !e.shiftKey && !(e.nativeEvent as any).isComposing) {
|
if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
|
||||||
onSubmit()
|
onSubmit()
|
||||||
} else if (e.key === 'Escape' && isRunning) {
|
} else if (e.key === 'Escape' && isRunning) {
|
||||||
onAbort()
|
onAbort()
|
||||||
|
|||||||
Reference in New Issue
Block a user