Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
Given a hierarchy of views:
<View> with onLayout prop<View> that has position: 'absolute' style- A TextInput
Text inside the TextInput can't be selected. Removing the first view's onLayout prop or the second view's position: 'absolute' will allow text in the TextInput to be selected.
React Native version:
v0.62.2
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Render inside a component the following:
import*asReactfrom'react';import{TextInput,View,Text}from'react-native';exportdefaultfunctionApp(){return(<Viewstyle={{flex: 1}}>{// Remove the onLayout for the text to become selectable}<ViewonLayout={()=>{}}><Viewstyle={{position: 'absolute',width: '100%',top: 50,paddingHorizontal: 8,}}><Textstyle={{marginBottom: 10}}wrap>
The following text should be selectable. For some reason, it's not
selectable on Android when placed inside the original
KeyboardAvoidingView or any View with an onLayout callback.
</Text><TextInputdefaultValue="Try selecting this text"/></View></View></View>);}- On Android, try to select text inside the TextInput
Expected Results
Describe what you expected to happen.
The text should be selected
Snack, code example, screenshot, or link to a repository:
https://snack.expo.io/@harrytravelchime/react-native-issue-29308
Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
Given a hierarchy of views:
<View>with onLayout prop<View>that hasposition: 'absolute'styleText inside the TextInput can't be selected. Removing the first view's onLayout prop or the second view's
position: 'absolute'will allow text in the TextInput to be selected.React Native version:
v0.62.2
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Expected Results
Describe what you expected to happen.
The text should be selected
Snack, code example, screenshot, or link to a repository:
https://snack.expo.io/@harrytravelchime/react-native-issue-29308