Skip to content

[0.88] fix(ios): backport clear text background omission for IME underlines - #59432

Open
riottt wants to merge 2 commits into
react:0.88-stablefrom
riottt:fix/0.88-ios-japanese-ime-underline
Open

riottt wants to merge 2 commits into
react:0.88-stablefrom
riottt:fix/0.88-ios-japanese-ime-underline

Conversation

@riottt

@riottt riottt commented Oct 24, 2026 •

Copy link
Copy Markdown

Summary:

Backport #59207 to 0.88-stable and add five regression tests. The production hunk is unchanged from the upstream implementation by Gregory Moskaliuk (@hryhoriiK97).

The default clear NSBackgroundColorAttributeName suppresses the Japanese IME composition underline even while the native marked range remains active. Omitting that attribute restores the underline. Visible backgrounds and foreground/background opacity remain intact. Input delegates and selection/synchronization logic are unchanged.

Related to #48497 and the underline portion of #56082.

Changelog:

[IOS] [FIXED] - Avoid a default transparent text background that can suppress the Japanese IME composition underline.

Test Plan:

RNTester and React Native Core built from source, with RCT_USE_PREBUILT_RNCORE=0. Xcode 27.0, iPhone 17 simulator / iOS 27.0, Apple Japanese kana keyboard.

  • Real converter tests: new cases give 4 failed / 1 passed before → 5/5 passed after. The full test class passes 29/29. The existing test file was registered locally in RNTesterUnitTests; verification-only project edits are excluded from this PR.
  • Fabric UI: 9/9 methods pass on each arm. Eight input scenarios cover empty/existing text, single/multiline, and controlled/uncontrolled values. Underlines are visible in 0/8 before → 8/8 after. Native marked range, text, selection, and JS values are asserted through composition, blur-to-commit, refocus, append, and deletion. Committed after frames contain no pixels matching the blue indicator color. Light/dark background and opacity samples match exactly. Screenshots were inspected.
  • Repository-wide yarn lint, clang-format --dry-run --Werror on both changed files, and git diff --check pass.

Reproduction, source/binary hashes, XCTest summaries, and raw screenshots

Fabric before / after

Physical devices, other iOS versions/keyboards, candidate selection/reconversion, and Grok itself remain untested. This is not a fix for every Japanese/CJK input issue. Full monorepo JS tests/build were not run; dependency audit reports pre-existing findings, with no dependency changes in this PR. Details are in the linked verification notes.

Backport the already-landed background attribute fix from react#59207.
Omitting the default clear attribute also restores the Japanese IME
composition underline in the isolated native input comparison.

(cherry picked from commit 0bd3326)
Copilot AI balanced review requested due to automatic review settings October 24, 2026 02:21
@meta-cla

meta-cla Bot commented Oct 24, 2026

Copy link
Copy Markdown

Hi @riottt!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@meta-cla

meta-cla Bot commented Oct 24, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 24, 2026

This branch has not been deployed

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Pick Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants