Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Fixed crash when textinput's default value exceeds maxLength #24084

Closed
wants to merge 1 commit into from

Conversation

zhongwuzw
Copy link
Contributor

Summary

Bug comes from #23545, if allowedLength < 0, it would crash if text.length > 1.

cc. @cpojer

Changelog

[iOS] [Fixed] - Fixed crash when textinput's default value exceeds maxLength

Test Plan

paste text which length bigger than 1, it would not crash.

      <View style={styles.exampleContainer}>
        <Header title="RNTester" />
        <TextInput value={'12345678'} maxLength={6}/>
      </View>

@facebook-github-bot facebook-github-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 Mar 21, 2019
Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot react-native-bot added Component: TextInput Related to the TextInput component. Platform: iOS iOS applications. Includes Changelog labels Mar 21, 2019
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @zhongwuzw in bbd98d5.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Mar 22, 2019
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. Component: TextInput Related to the TextInput component. Merged This PR has been merged. Platform: iOS iOS applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants