fix: Ignore Enter pressed during IME composition in input fields

Closes #1703
This commit is contained in:
babu-ch
2026-07-03 20:54:52 +09:00
parent 856768c45e
commit 9f18028337
11 changed files with 200 additions and 3 deletions
@@ -15,7 +15,7 @@ import { usePopup } from '../../../lib/popup';
import selectors from '../../../selectors';
import { useClosable, useForm, useNestedRef } from '../../../hooks';
import { isModifierKeyPressed } from '../../../utils/event-helpers';
import { isComposing, isModifierKeyPressed } from '../../../utils/event-helpers';
import { CardTypeIcons } from '../../../constants/Icons';
import SelectCardTypeStep from '../SelectCardTypeStep';
@@ -88,6 +88,10 @@ const AddCard = React.memo(({ isOpened, className, onCreate, onClose }) => {
const handleFieldKeyDown = useCallback(
(event) => {
if (isComposing(event)) {
return;
}
switch (event.key) {
case 'Enter':
event.preventDefault();