[Android] selection works incorrect and crashes in TextInput component
See original GitHub issueReact Native version:
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
Memory: 6.59 GB / 15.38 GB
Binaries:
Node: 8.11.1 - C:\Program Files\nodejs\node.EXE
npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD
Watchman: 4.9.0 - C:\Users\Ilya_Staver\Desktop\AMIClient\watchman.EXE
IDEs:
Android Studio: Version 3.4.0.0 AI-183.6156.11.34.5692245
react: 16.8.6
react-native: 0.60.4
Steps To Reproduce
- Create TextInput component on Android with onSelectionChange handler and selection prop
- Try to type some letters.
Describe what you expected to happen: TextInput should correct update selection
Snack, code example, screenshot, or link to a repository:
onSelectionChange = ({ nativeEvent: { selection } }) => this.setState({ selection });
<TextInput
ref={ref => this.inputRef = ref}
style={styles.messageInput}
maxLength={maxMessageLength}
multiline
blurOnSubmit={false}
onSelectionChange={this.onSelectionChange}
selection={this.state.selection}
selectionColor={blueBase}
onChangeText={this.onChangeText}
value={this.state.message}
autoCapitalize="none"
underlineColorAndroid={transparent}
placeholder={this.getPlaceholderMessage()}
placeholderTextColor={grayDarkTransparent(0.35)}
editable={!this.state.isVoiceRecording}
/>

Issue Analytics
- State:
- Created 4 years ago
- Reactions:15
- Comments:9
Top Results From Across the Web
React-native TextInput crash - Stack Overflow
EDIT: Ok, so I updated npm re-installed the project and it still crashed. However, after I restarted Expo on my phone, it started...
Read more >Multi-window support - Android Developers
Multi-window mode enables multiple apps to share the same screen simultaneously. Apps can be side by side or one above the other (split-screen...
Read more >TextView - Android Developers
Autofill type for a selection list field, which is filled by an int representing the element index inside the list (starting at 0...
Read more >App resources overview - Android Developers
If the qualifiers are ordered wrong, the resources are ignored. Save the respective alternative resources in this new directory.
Read more >ANRs - Android Developers
ANRs are a problem because the app's main thread, which is responsible for updating the UI, can't process user input events or draw, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The same bug happens in 0.60.5 related to this issue #25265
any update?