diff --git a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistInput.tsx b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistInput.tsx index c30dd5cd10..4854f74201 100644 --- a/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistInput.tsx +++ b/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsBlocklistInput.tsx @@ -74,6 +74,9 @@ export const SettingsAccountsBlocklistInput = ({ }); const handleKeyDown = (e: React.KeyboardEvent) => { + if (e.nativeEvent.isComposing || e.keyCode === 229) { + return; + } if (e.key === Key.Enter) { submit(); } diff --git a/packages/twenty-front/src/modules/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement.ts b/packages/twenty-front/src/modules/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement.ts index f3b3dc8a86..5b9a110271 100644 --- a/packages/twenty-front/src/modules/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement.ts +++ b/packages/twenty-front/src/modules/ui/utilities/hotkey/hooks/useHotkeysOnFocusedElement.ts @@ -48,6 +48,10 @@ export const useHotkeysOnFocusedElement = ({ return useHotkeys( keys, (keyboardEvent, hotkeysEvent) => { + if (keyboardEvent.isComposing || keyboardEvent.keyCode === 229) { + return; + } + callScopedHotkeyCallback({ keyboardEvent, hotkeysEvent, diff --git a/packages/twenty-front/src/pages/onboarding/CreateWorkspace.tsx b/packages/twenty-front/src/pages/onboarding/CreateWorkspace.tsx index 974899479f..324832c08b 100644 --- a/packages/twenty-front/src/pages/onboarding/CreateWorkspace.tsx +++ b/packages/twenty-front/src/pages/onboarding/CreateWorkspace.tsx @@ -141,6 +141,9 @@ export const CreateWorkspace = () => { ); const handleKeyDown = (event: React.KeyboardEvent) => { + if (event.nativeEvent.isComposing || event.keyCode === 229) { + return; + } if (event.key === Key.Enter) { event.preventDefault(); handleSubmit(onSubmit)(); diff --git a/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx b/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx index 3b137cf9c0..3be8dbead4 100644 --- a/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx +++ b/packages/twenty-front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew.tsx @@ -159,6 +159,9 @@ export const SettingsDevelopersApiKeysNew = () => { placeholder={t`E.g. backoffice integration`} value={formValues.name} onKeyDown={(e) => { + if (e.nativeEvent.isComposing || e.keyCode === 229) { + return; + } if (e.key === Key.Enter) { handleSave(); }