fix: guard Escape key against IME composition in inline edit

Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This commit is contained in:
Taylor Ho
2026-04-17 07:10:26 -10:00
parent 103865b8f1
commit c7e96edc40
@@ -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) {