Skip to content

The onChangeText and onChange events on a TextInput fire twice on Android #45513

@kadikraman

Description

@kadikraman

Description

With the new architecture enabled, the onChangeText and onChange events on a TextInput fire twice on Android.

Steps to reproduce

  1. Install the application with yarn android
  2. Enter some text in the text input
  3. Observe the logs in the console
  4. EXPECTED: each onChange and onChangeText gets logged once per key stroke
  5. ACTUAL: they get triggered twice per key stroke
Screenshot 2024-07-18 at 11 12 28

React Native Version

0.74.3

Affected Platforms

Runtime - Android

Areas

Fabric - The New Renderer

Output of npx react-native info

System:
  OS: macOS 14.5
  CPU: (8) arm64 Apple M2
  Memory: 178.64 MB / 24.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.14.0
    path: ~/.nvm/versions/node/v20.14.0/bin/node
  Yarn:
    version: 3.6.4
    path: ~/.nvm/versions/node/v20.14.0/bin/yarn
  npm:
    version: 10.7.0
    path: ~/.nvm/versions/node/v20.14.0/bin/npm
  Watchman:
    version: 2024.05.06.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/kadi/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10671973
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /Users/kadi/.sdkman/candidates/java/current/bin/javac
  Ruby:
    version: 2.7.8
    path: /Users/kadi/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.3
    wanted: 0.74.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Stacktrace or Logs

(NOBRIDGE) LOG  change
 (NOBRIDGE) LOG  t
 (NOBRIDGE) LOG  change
 (NOBRIDGE) LOG  t
 (NOBRIDGE) LOG  change
 (NOBRIDGE) LOG  te
 (NOBRIDGE) LOG  change
 (NOBRIDGE) LOG  te
 (NOBRIDGE) LOG  change
 (NOBRIDGE) LOG  tes
 (NOBRIDGE) LOG  change
 (NOBRIDGE) LOG  tes
 (NOBRIDGE) LOG  change
 (NOBRIDGE) LOG  test
 (NOBRIDGE) LOG  change
 (NOBRIDGE) LOG  test

Reproducer

https://github.com/kadikraman/new-arch-text-input-bug

Screenshots and Videos

Screen.Recording.2024-07-18.at.11.20.20.mov

Metadata

Metadata

Assignees

Labels

Component: TextInputRelated to the TextInput component.Issue: Author Provided ReproThis issue can be reproduced in Snack or an attached project.PartnerPlatform: AndroidAndroid applications.Resolution: FixedA PR that fixes this issue has been merged.Type: New ArchitectureIssues and PRs related to new architecture (Fabric/Turbo Modules)p: ExpoPartner: Expo

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions