TextInput duplicate value when inserting at the beginning (ios) maxLength #21639
Closed
3 tasks done
Labels
Bug
Component: TextInput
Related to the TextInput component.
Platform: iOS
iOS applications.
Resolution: Locked
This issue was locked by the bot.
Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.10.0 - /usr/local/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
IDEs:
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.2 => 0.57.2
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
react-native: 0.57.2
Description
[iOS only]
When entering 1 character at the beginning of the TextInput, we expect to have only 1 character inserted. However we experience that the character is inserted and the current value is duplicated.
This behaviour is reproducible when the prop
maxLength
is used and when length of the current value is above the half of themaxLength
prop.I have created an app from scratch using
create-react-native-app
, and I have modifiedApp.js
to include the following:Reproducible Demo
Core investigation
RCTBaseTextInputView.m
the ivar_predictedText
is not updated correctly when inserting at the beginning.The text was updated successfully, but these errors were encountered: