-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
[Android] Fix letters duplication when using autoCapitalize #29070
Closed
Commits on Jun 5, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 677a789 - Browse repository at this point
Copy the full SHA 677a789View commit details -
Configuration menu - View commit details
-
Copy full SHA for 80ebff4 - Browse repository at this point
Copy the full SHA 80ebff4View commit details
Commits on Jul 1, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 7e8eb41 - Browse repository at this point
Copy the full SHA 7e8eb41View commit details -
Configuration menu - View commit details
-
Copy full SHA for a667188 - Browse repository at this point
Copy the full SHA a667188View commit details
Commits on Aug 30, 2020
-
check for reactTextUpdate.length
JavaScript Controller TextInput keep their own state and value for the TextInput. This means that the value in Java "This is my word" can be different from the value in JavaScript, in the case of the relevant example we delete spaces from sentence like below "Thisismyword" The two strings have different length, this causes several problems, an example is setSpan(5 ... 5) ends beyond length 4 facebook#29070 (comment) where we change in JavaScript the TextInput value, but then a setSelection or other operations are triggered in Java with the old parameters. Ideally would be great keeping the same state between Java and JavaScript, but the current solution is checking and handling this scenarios
Configuration menu - View commit details
-
Copy full SHA for 04ce594 - Browse repository at this point
Copy the full SHA 04ce594View commit details -
Pull Request facebook#29070 solves issue facebook#11068 by calling setText(string) https://github.com/fabriziobertoglio1987/react-native/blob/a66718881611eb687035ff458f7f13befd26f0a3/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java#L509-L511 but using setText() causes further problems: 1) After setText we need to call setSelection, to position the cursor at the previous state. setText will erase the previous cursor position https://github.com/fabriziobertoglio1987/react-native/blob/a66718881611eb687035ff458f7f13befd26f0a3/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java#L511 2) calling setSelection after setText causes issues with controlled TextInput. The TextInput is keeping its own internal TextInput value state, which is different from the Java version and has different length. facebook#29070 (comment) This causes erors like below, when Java runs operations like setSelection after setText, as the text in Java is not the JavaScript version of the Text. setSpan(5 ... 5) ends beyond length 4 A solution for this is keeping track of the reactTextUpdate.length sent from JavaScript and saving it as instance variable mMaximumTextLength 3) JavaScript functionality can be included in the library or in ReactNative Application to build fully controller TextInputs. An example is the one included in this diff, where I use onSelectionChange, selection and onChangeText to set from JavaScript the position of the cursor, avoiding to set the cursor in a position higher then text.length The same functionality could be later included in TextInput.js
Configuration menu - View commit details
-
Copy full SHA for bab02b5 - Browse repository at this point
Copy the full SHA bab02b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 784a210 - Browse repository at this point
Copy the full SHA 784a210View commit details
Commits on Sep 12, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 206fef9 - Browse repository at this point
Copy the full SHA 206fef9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 85897b4 - Browse repository at this point
Copy the full SHA 85897b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d337da - Browse repository at this point
Copy the full SHA 0d337daView commit details
Commits on Feb 1, 2021
-
Configuration menu - View commit details
-
Copy full SHA for bbe195a - Browse repository at this point
Copy the full SHA bbe195aView commit details
Commits on Feb 2, 2021
-
update selection with maybeSetText
fixes issue caused by setPosition in a new position higher then text.length(); setSpan(5 ... 5) ends beyond length 4 facebook#29070 (comment)
Configuration menu - View commit details
-
Copy full SHA for d28ac7b - Browse repository at this point
Copy the full SHA d28ac7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f8aea21 - Browse repository at this point
Copy the full SHA f8aea21View commit details -
Configuration menu - View commit details
-
Copy full SHA for 76cd475 - Browse repository at this point
Copy the full SHA 76cd475View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ec343b - Browse repository at this point
Copy the full SHA 1ec343bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5957e59 - Browse repository at this point
Copy the full SHA 5957e59View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3354c31 - Browse repository at this point
Copy the full SHA 3354c31View commit details
Commits on Feb 3, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 6490443 - Browse repository at this point
Copy the full SHA 6490443View commit details
Commits on Feb 4, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 53c4868 - Browse repository at this point
Copy the full SHA 53c4868View commit details
Commits on Feb 12, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 532d772 - Browse repository at this point
Copy the full SHA 532d772View commit details
Commits on Feb 16, 2021
-
Configuration menu - View commit details
-
Copy full SHA for ae74063 - Browse repository at this point
Copy the full SHA ae74063View commit details
Commits on Mar 3, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 8e7bd2e - Browse repository at this point
Copy the full SHA 8e7bd2eView commit details
Commits on Jan 18, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8ac631e - Browse repository at this point
Copy the full SHA 8ac631eView commit details -
revert changes to maybeSetSelection
mMaximumTextLength was added to fix the error described in facebook#29070 (comment) : ``` setSpan(5 ... 5) ends beyond length 4 ``` A similar fix was merged in master with commit facebook@de44184, I reverted this changes as the existing solution seems to fix this error.
Configuration menu - View commit details
-
Copy full SHA for 7ecdea7 - Browse repository at this point
Copy the full SHA 7ecdea7View commit details
Commits on Mar 18, 2022
-
Configuration menu - View commit details
-
Copy full SHA for b86f498 - Browse repository at this point
Copy the full SHA b86f498View commit details -
Configuration menu - View commit details
-
Copy full SHA for ec52724 - Browse repository at this point
Copy the full SHA ec52724View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e6ab1b - Browse repository at this point
Copy the full SHA 6e6ab1bView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.