Skip to content

fix(useCombobox): preserve IME composition - #1699

Open
naveedsajjdawan wants to merge 1 commit into
downshift-js:masterfrom
naveedsajjdawan:fix/ime-composition-input
Open

naveedsajjdawan wants to merge 1 commit into
downshift-js:masterfrom
naveedsajjdawan:fix/ime-composition-input

Conversation

@naveedsajjdawan

Copy link
Copy Markdown

What changed

  • Ignore internal InputChange dispatches while the browser reports an active IME composition.
  • Keep user-provided onChange/onInput handlers running during composition.
  • Process the final, non-composing input event normally.
  • Add a regression test covering intermediate Japanese input and the final committed value.

Why

With a controlled inputValue, dispatching every intermediate IME input event triggers Downshift state callbacks and rerenders the input. That can terminate the browser's composition session before users finish entering Japanese, Chinese, Korean, or other composition-based text.

Deferring Downshift's internal update until the committed input event preserves the native composition session without changing normal input behavior.

Verification

  • npx jest src/hooks/useCombobox/__tests__/getInputProps.test.js --runInBand — 153 tests passed
  • npx tsc --noEmit -p ./tsconfig.json — passed
  • Prettier check for both changed files — passed

Fixes #1452

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Japanese IME not working when controlling inputValue in useCombobox

1 participant