mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
fix: guard Escape key against IME composition in inline edit
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This commit is contained in:
@@ -379,7 +379,7 @@ export const MessageBubble = memo(function MessageBubble({
|
||||
|
||||
const handleEditKeyDown = useCallback(
|
||||
(e: React.KeyboardEvent) => {
|
||||
if (e.key === "Escape") {
|
||||
if (e.key === "Escape" && !e.nativeEvent.isComposing) {
|
||||
e.preventDefault();
|
||||
onCancelEdit?.();
|
||||
} else if (e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing) {
|
||||
|
||||
Reference in New Issue
Block a user