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

TextInput Paste occurs twice when close to maxLength #24766

Closed
Milesc22 opened this issue May 8, 2019 · 3 comments
Closed

TextInput Paste occurs twice when close to maxLength #24766

Milesc22 opened this issue May 8, 2019 · 3 comments
Labels
Bug Component: TextInput Related to the TextInput component. Resolution: Locked This issue was locked by the bot.

Comments

@Milesc22
Copy link

Milesc22 commented May 8, 2019

🐛 Bug Report

React-Native 0.55.1
Device: iPhone X, iOS 12.1.2

When pasting into a TextInput with a maxLength the paste seems to occur twice if the size of the clipboard text is more than half as long as the remaining characters. E.g. maxLength = 150, type 121 chars (29 remain), paste 15 chars. The TextInput will then be populated with the copied 15 as well as and additional 14/15 of the copied text.

To Reproduce

Paste more than half of the remaining characters into a TextInput with maxLength defined.

Expected Behavior

The paste action should only paste once regardless of how close to maxLength we are.

Environment

Environment:
OS: macOS 10.14.4
Node: 8.11.1
Yarn: Not Found
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 10.1 Build version 10B61
Android Studio: 3.4 AI-183.5429.30.34.5452501

Packages: (wanted => installed)
react: 16.3.2 => 16.3.2
react-native: 0.55.1 => 0.55.1

@Milesc22 Milesc22 added the Bug label May 8, 2019
@react-native-bot react-native-bot added the Component: TextInput Related to the TextInput component. label May 8, 2019
@matthargett
Copy link
Contributor

Can you add a link to a snack that reproduced the problem? https://snack.expo.io/

@zhongwuzw
Copy link
Contributor

@Milesc22 And could you test in the latest version or master branch? because we fixes many bugs about textinput.

@michalchudziak
Copy link
Contributor

Hi! I'm not able to reproduce this with React Native 0.59.8. If you think, that this issue still occurs, please provide us with the snack or repro steps. We'll be glad to re-open it.

@facebook facebook locked as resolved and limited conversation to collaborators May 30, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label May 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: TextInput Related to the TextInput component. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants