Skip to content

Controlled TextInput duplicates dictated text in iOS 16 #36045

Description

@jpdriver

Description

  • When trying to use dictation with a controlled <TextInput /> in iOS 16, entered text is duplicated
  • This issue does not affect iOS 15
  • This issue does not affect uncontrolled <TextInput />s
  • Text seems to be being duplicated within native code
    • by the time an onChangeText callback is called, the incoming text contains the duplication
  • Originally noticed on RN 0.68.2 but confirmed it is still happening with latest (0.71.2 at time of writing)

Version

0.71.2

Output of npx react-native info

info Fetching system and libraries information...
System:
OS: macOS 13.2
CPU: (10) arm64 Apple M1 Max
Memory: 992.61 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 19.1.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 8.19.3 - /opt/homebrew/bin/npm
Watchman: 2022.11.14.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9477386
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.17 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0 react-native: 0.71.2 => 0.71.2 react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found

Steps to reproduce

  • tap a controlled <TextInput /> on iOS 16
  • dictate something

Snack, code example, screenshot, or link to a repository

Snack

https://snack.expo.dev/@jpmigueldriver/dictation-dictation

Screen Recordings

iOS 15

  • demonstrates expected behaviour
  • no difference between controlled vs. uncontrolled
RPReplay_Final1675365463.MP4

iOS 16

  • uncontrolled input works as expected
  • controlled input duplicates dictated text
RPReplay_Final1675365420.MP4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: TextInputRelated to the TextInput component.Needs: Triage 🔍Platform: iOSiOS applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions