callstack / react-native-paper

Material Design for React Native (Android & iOS)
https://reactnativepaper.com
MIT License
12.96k stars 2.1k forks source link

Text box cursor placement incorrect after android build , but appears correctly during dev and EAS update #4194

Open steve-24school opened 11 months ago

steve-24school commented 11 months ago

I am using expo for react-native development using their EAS build and EAS update services. I have an issue with the TextInput component. When I create an eas build for Android and run the app the cursor of the text box seems to stick to the top of the textbox as shown in the image image

When I do an EAS update without any code changes and the I relaunch the app the cursor appears in its correct position. So Im not sure what happens between an eas build and eas update that makes the TextInput cursor work component without any code changes

| react-native-paper | ^5.10.3 | expo sdk | ^49.0.0

Steven-MKN commented 11 months ago

@steve-24school do you have numberOfLines set to anything greater than 1 on the TextInput component? could you please show what props and values you have added?

steve-24school commented 11 months ago

Hi Steve this is how code looks like

<View className='bg-slate-200 px-1 gap-x-1  flex-row  items-center pb-6 self-end'>

                <TextInput
                    ref={inputRef}
                    onChangeText={(text) =>
                    {                       

                    }}
                    value={message}
                    style={{ flex: 1 }}
                    outlineStyle={{
                        borderRadius: 15
                    }}
                    textAlign="center"
                    multiline
                    mode={'outlined'}
                    onSubmitEditing={() => message && handleSendMessage}

                    right={<TextInput.Icon
                        style={{ margin: 5 }}
                        forceTextInputFocus={false}
                        icon={() => <Entypo color={'#403071'} name='attachment' size={24} />}
                        onPress={toggleModal} />}
                />

                {message && <TouchableOpacity onPress={handleSendMessage} >
                    <MaterialCommunityIcons name='send-circle-outline' size={44} color={'#403071'} />
                </TouchableOpacity>}
            </View>