I'm using version 0.32.1 and when I long press on text in a TextInput it doesn't result in the selection popup that I'd expect (ie. with copy, select all, and paste buttons). Furthermore, I am unable to select any text at all. I haven't had a chance to deep dive the react native code yet and see what's going on. Is anyone else seeing the same issue?
My TextInput is configured like this:
<TextInput
onBlur={ this._onFinishedEditing.bind(this) }
placeholder={ this.props.element.placeholderText }
onEndEditing={ this._onFinishedEditing.bind(this) }
onChangeText={ (arg) => {
this.currentText = arg
}}
selectTextOnFocus={ true }
multiline={ true }
numberOfLines={ 4 }
underlineColorAndroid={ '#fff' }
/>
It seems similar to what was fixed in https://github.com/facebook/react-native/issues/3208.
It works fine on the master branch.


Ah, I only happens when using a TextInput inside a ListView.
The following code reproduces it:
const DebugView = React.createClass({
componentWillMount: function(){
this.dataSourceDef = new ListView.DataSource({
rowHasChanged: (r1, r2) => r1 !== r2
})
this.setState({
dataSource: this.dataSourceDef.cloneWithRows([ {foo: 1} ])
})
},
render: function(){
return (
<ListView
style={{flex:1}}
dataSource={this.state.dataSource}
renderRow={()=> {
return (
<View style={{flex: 1}}>
<TextInput />
</View>
)
}}
/>
)
}
})
I figured it out. The culprit is removeClippedSubviews on the ListView's underlying ScrollView, which defaults to true.
If you set removeClippedSubviews to false the ListView the text selection box will appear as expected.
It might be difficult to change the default value, but I suggest we at least update the readme to warn people about this potentially unintended behavior. It currently just describes the option as a performance optimization.
Any thoughts on this? I can handle the README change if people don't have the time. It's a gotcha that should be mentioned, IMHO.
I have the same issue when using Textinput inside ViewPagerAndroid.
I have the same issue on Android only, I cannot copy/paste etc... in a TextInput when it is in a KeyboardAvoidingView.
Once back in a View, it's works again :(
same problem
I have the same issue when using TextInput inside Viewpager on Android 7, 8
same problem,using Textinput inside ScrollableTabView
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.
Any update / workaround for this? Using TextInput inside ViewPagerAndroid.
Had the same problem, only when using TextInput with multiline={true} inside ViewPagerAndroid, though single-line works fine.
Noticed that when the phone is rotated to landscape and back to portrait, copy-paste starts to work normally. So I made a hack, which renders the TextInput with width set to 99% and after a small timeout changes it to 100%. That makes copy-paste work fine for me.
Most helpful comment
I have the same issue when using
TextinputinsideViewPagerAndroid.