facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.41k stars 24.36k forks source link

TextInput maximum length limit does not work in old architecture for iOS #47563

Open team55 opened 1 week ago

team55 commented 1 week ago

Description

Steps to reproduce

create new application RCT_NEW_ARCH_ENABLED=0 pod install

add text input

React Native Version

0.76.1

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 15.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 126.95 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.8.0
    path: ~/.nvm/versions/node/v20.8.0/bin/node
  Yarn:
    version: 3.6.4
    path: ~/.nvm/versions/node/v20.8.0/bin/yarn
  npm:
    version: 10.5.0
    path: ~/.nvm/versions/node/v20.8.0/bin/npm
  Watchman:
    version: 2024.10.21.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.1
      - iOS 18.1
      - macOS 15.1
      - tvOS 18.1
      - visionOS 2.1
      - watchOS 11.1
  Android SDK:
    API Levels:
      - "24"
      - "28"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 28.0.3
      - 29.0.2
      - 29.0.3
      - 30.0.2
      - 30.0.3
      - 33.0.0
      - 33.0.1
      - 33.0.2
      - 34.0.0
      - 35.0.0
    System Images:
      - android-28 | ARM 64 v8a
      - android-28 | Google APIs ARM 64 v8a
      - android-28 | Google ARM64-V8a Play ARM 64 v8a
      - android-33 | Android Automotive with Google APIs ARM 64 v8a
      - android-33 | Google Play ARM 64 v8a
      - android-34 | ARM 64 v8a
      - android-34 | Google APIs ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
      - android-35 | Google APIs ARM 64 v8a
      - android-35 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2411.12169540
  Xcode:
    version: 16.1/16B40
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.9
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.2
    wanted: latest
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.1
    wanted: 0.76.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

No logs

Reproducer

https://github.com/react-native-community

Screenshots and Videos

it works in snack, so I'm not attaching it.

react-native-bot commented 1 week ago

[!WARNING] Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

shubhamguptadream11 commented 1 week ago

@team55 Please provide a valid reproducer. Also provide some relevant stack trace related to this.

team55 commented 1 week ago

Stacktrace what?

shubhamguptadream11 commented 1 week ago

Not stack trace. We need some reproducer in order to work on this. You can use this template.

faljabi commented 1 week ago

I am facing the same issue. Any TextInput is not respecting the maxLength on iOS. It is working fine on Android.

faljabi commented 4 days ago

Any update on this please? There is no way to use a state for this for every input in our apps.