Skip to content

The open alternative to Salesforce, designed for AI.

fix: ignore IME composition Enter in chat-thread and attachment rename inputs (#22270)

greymoth13f80f0d95f7
diff --git a/packages/twenty-front/src/modules/activities/files/components/AttachmentRow.tsx b/packages/twenty-front/src/modules/activities/files/components/AttachmentRow.tsx
index 21c87e416b9..3d6b1bb0e0b 100644
--- a/packages/twenty-front/src/modules/activities/files/components/AttachmentRow.tsx
+++ b/packages/twenty-front/src/modules/activities/files/components/AttachmentRow.tsx
@@ -141,6 +141,9 @@ export const AttachmentRow = ({
};
const handleOnKeyDown = (e: React.KeyboardEvent) => {
+ if (e.nativeEvent.isComposing || e.keyCode === 229) {
+ return;
+ }
if (e.key === 'Enter') {
saveAttachmentName();
}
diff --git a/packages/twenty-front/src/modules/ai/components/AiChatThreadListItem.tsx b/packages/twenty-front/src/modules/ai/components/AiChatThreadListItem.tsx
index c8bb174ea8a..8f52274d151 100644
--- a/packages/twenty-front/src/modules/ai/components/AiChatThreadListItem.tsx
+++ b/packages/twenty-front/src/modules/ai/components/AiChatThreadListItem.tsx
@@ -129,6 +129,9 @@ export const AiChatThreadListItem = ({ thread }: AiChatThreadListItemProps) => {
onFocus={(event) => event.target.select()}
onBlur={() => commitRename(draftTitle)}
onKeyDown={(event) => {
+ if (event.nativeEvent.isComposing || event.keyCode === 229) {
+ return;
+ }
if (event.key === Key.Enter) {
event.preventDefault();
void commitRename(draftTitle);