Skip to content

Fix dictated text duplicated in controlled single-line TextInput on iOS (Fabric) - #59407

Open
paulnewby wants to merge 1 commit into
react:mainfrom
paulnewby:fix/ios-dictation-duplicates-controlled-textinput
Open

paulnewby wants to merge 1 commit into
react:mainfrom
paulnewby:fix/ios-dictation-duplicates-controlled-textinput

Conversation

@paulnewby

@paulnewby paulnewby commented Oct 23, 2026 •

Copy link
Copy Markdown

Summary:

Fixes #59406.

On iOS 16+ with the New Architecture, ending dictation in a controlled single-line TextInput inserts the dictated text twice. RCTTextInputComponentView's _textOf:equals: only falls back to a plain-text comparison during dictation when textInputMode.primaryLanguage is "dictation", which iOS 16+ no longer reports. The attributed-string comparison then fails, the echoed value is written back into the field mid-dictation, and iOS inserts its final result again.

The old architecture fixed this in #37188 (for #36045) by also checking dictationRecognizing. This PR adds the same check to Fabric. dictationRecognizing is already on RCTBackedTextInputViewProtocol.

Changelog:

[IOS] [FIXED] - Fix dictated text being duplicated in controlled single-line TextInput on the New Architecture

Test Plan:

Reproducer: https://github.com/paulnewby/rn-dictation-reproducer (RN 0.88.0, controlled single-line TextInput, physical device required). iPad (10th generation), iPadOS 26, 5 attempts each, dictation ended with the keyboard mic key:

Controlled Uncontrolled
Before 5/5 duplicated 0/5
After 0/5 -

Tested on 0.88.0 built from source (RCT_USE_PREBUILT_RNCORE=0); this hunk applies unchanged to main.

Before:

rn088-dictation-stock.mp4

After:

rn088-dictation-patched.mp4

@meta-cla

meta-cla Bot commented Oct 23, 2026

Copy link
Copy Markdown

Hi @paulnewby!

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!

@meta-cla

meta-cla Bot commented Oct 23, 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 23, 2026
@meta-cla

meta-cla Bot commented Oct 23, 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!

@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Oct 23, 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. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS] Controlled single-line TextInput duplicates dictated text (New Architecture)

1 participant