Skip to content

fix: TokenField IME composition broken in Firefox - #10422

Open
chirokas wants to merge 1 commit into
adobe:mainfrom
chirokas:tokenfield-ime-firefox
Open

fix: TokenField IME composition broken in Firefox#10422
chirokas wants to merge 1 commit into
adobe:mainfrom
chirokas:tokenfield-ime-firefox

Conversation

@chirokas

@chirokas chirokas commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Closes

Unlike Chromium, Firefox does not select the composition text before replacing it during IME handling.

Firefox:
https://github.com/mozilla-firefox/firefox/blob/45135a4adb3c83c65c090e9c613775a5e193aba5/editor/libeditor/EditorBase.cpp#L4055-L4235

Chromium:
https://github.com/chromium/chromium/blob/2790129dcbdb4fa07d8bd2b282a74e56b26c40dd/third_party/blink/renderer/core/editing/ime/input_method_controller.cc#L1026

We should use the getTargetRanges() method in the beforeinput event to get the composition range.

Video.Project.mp4

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@chirokas
chirokas marked this pull request as ready for review August 4, 2026 13:35
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.

1 participant