Skip to content

Conversation

@Robot-Inventor
Copy link
Contributor

@Robot-Inventor Robot-Inventor commented Jan 5, 2026

What?

Prevents hasMany text fields from creating new items when Enter/Tab is
pressed while IME composition is active.

Why?

IME users were unintentionally adding multiple items because composition
key events were treated as submit actions.

How?

  • Check event.nativeEvent.isComposing in
    packages/ui/src/elements/ReactSelect/index.tsx before creating a new
    option.
  • Guard packages/ui/src/fields/Text/Input.tsx editable label key
    handling with event.nativeEvent.isComposing so Enter/Tab/Escape only
    finalize when not composing.

Fixes #12427

\### What?

Prevents hasMany text fields from creating new items when Enter/Tab is
pressed while IME composition is active.

\### Why?

IME users were unintentionally adding multiple items because composition
key events were treated as submit actions.

\### How?

- Check `event.nativeEvent.isComposing` in
  `packages/ui/src/elements/ReactSelect/index.tsx` before creating a new
  option.
- Guard `packages/ui/src/fields/Text/Input.tsx` editable label key
  handling with `event.nativeEvent.isComposing` so Enter/Tab/Escape only
  finalize when not composing.

Fixes payloadcms#12427
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The text field with the hasMany option enabled is not compatible with CJK IME input

2 participants