react-native: TextInput caret is not visible with the property keyboardType="email-address"
Description
the cursor is not visible, the field expects an email format. this happens in: Android 8.1.0 Redmi 5 Plus Model: MEG7 Android 10 Redmi Note 9S Model: M2003J6A1G Android 10 OnePlus 7 Pro Model: GM1910
Version
0.64.2
Output of react-native info
Android 8.1.0 Redmi 5 Plus Modelo: MEG7
Android 10 Redmi Note 9S Modelo: M2003J6A1G
Android 10 OnePlus 7 Pro Modelo: GM1910
Steps to reproduce
SCAN QR and open expo
I found a “work around” adding by default the property caretHidden = {false}.
Remove or set the “caretHidden” property to true.
Then de issue can be show.
Snack, code example, screenshot, or link to a repository
https://snack.expo.dev/@gastonrd7/textinput-keyboardtype-email-address
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 15 (1 by maintainers)
Sorry for the source code. I changed it and I share a link with simpler code. I found a “work around” adding by default the property caretHidden = {false}. Although this property is false, for the specified OS and the specified mobile device, passing it the caret is displayed. This is a work around since we shouldn’t pass it to it if it is false by default.
Having the same issue. For me the problem reproduced on Lenovo tb 8505f and Xiaomi Redmi 9A (Android 10). But setting caretHidden = {false} doesn’t even help.
set caretHidden={false}
Solved it by adding:
keyboardType=“email-address” caretHidden={false} textContentType=“emailAddress” autoComplete={“email”}
AND
flex: 1 on text input style. cd android && ./gradlew clean
On Android, using
react-native@0.73.2andcaretHidden={false}doesn’t work for me. However, strangely, if I change it to true, save, and then switch it back to false, it works.for xiaomi mi 8 lite
caretHidden={false}seems to workFor Redmi 9T
caretHidden={false}solved.