react-native-actions-sheet
react-native-actions-sheet copied to clipboard
Text selection of TextInput inside ActionsSheet not working on Android
I am using TextInput inside react-native-actions-sheet, apparently when I try to select text the selectors do not work. it does not also show selection menu for copy, paste, cut etc. The text input works fine when it is rendered outside of actions sheet
Tried API level 30 and 31
Sample Code
import React from 'react';
import {
View,
TextInput,
Button,
} from 'react-native';
import ActionSheet from 'react-native-actions-sheet';
const SampleComponent = () => {
const sheetModalRef = useRef<ActionSheet>();
return (
<View style={{ height: getWindowDimensions().height, backgroundColor: 'white' }}>
<TextInput
style={{ height: 200 }}
placeholder={'Add text here first...'}
/>
<Button
title='Show Modal'
onPress={() => {
sheetModalRef.current.show()
}}
/>
<ActionSheet
ref={sheetModalRef}
containerStyle={{ height: 400 }}>
<TextInput
style={{ height: 200 }}
placeholder={'Add text here...'}
/>
</ActionSheet>
</View>
);
}
Demo Video
https://user-images.githubusercontent.com/6298342/173057480-a74b6bfd-552b-479f-bc79-0443a4d15495.mov
My Stack react-native: 0.63 react-native-actions-sheet: 0.6.1
I just tested in the example app and it is working normally. Maybe it has to do something with your react-native version since it's older. Can you try the example app on the same device?
The same for me, but just for Text components
RN version: 0.66 action sheet version: 0.6.1
Fixed in v0.8.0