-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[0.57.4-0.57.8/0.58.6] using textTransform causes text to disappear on Android, but works on iOS #21966
Comments
Enabling textTransform on android with RN0.57.4 breaks the styling of the text and renders the text very weirdly. |
I tested with React Native 0.57.5, and the bug is still reproducible. |
reproducible on react-native 0.58-rc.0 |
same as here |
I have the text displaying however it isn't applying my color styling to it. |
I noticed something weird: If the text has some (any) emoji, the text appears. |
Can reproduce this on react-native 0.57.7 as well |
experiencing the same issue in react-native 0.57.5 |
Same here ! |
Is this reproducible on master? |
I'm facing the same issue ATM. On iOS RN 0.57.7 A workaround for now is using JS to capitalize the string
|
Still reproducible with 0.57.8 |
Any Update on this issue? |
There is a pull request that should fix the bug: #22670 |
facebook/react-native#21966 textTransform doesn’t work properly on the latest React Native version.
Will f6f8b09 be part of the next RC, would be great to get a version with the fix. |
Still reproducible with v0.58.4 |
I'm using this function as a workraound, perhaps it could be useful to somebody |
Looks like this is finally fixed in React Native 0.59.0-rc.0 and the fix is most likely going to be part of the 0.59.0 release. |
Boss: Why is there emoji? |
Reproducible on 0.58.5… I'm using string.toUpperCase() as workaround |
Confirming. Still happens on 0.58.5 |
Anyone have any workaround to solve this bug? Thanks |
Wait for 0.59 to use text-transform |
User |
does not fix the RN issue but fixes your problem |
…d bug to be fixed. it seems it's fixed already but not released yet, should be released soon. issue: facebook/react-native#21966
react-native 0.59.0 |
0.59.0 is released, @kristerkari is it finally fixed, as you mentioned here? |
I will re-test 👍 |
I created a fresh 0.59.0 project, added some styling, and it seems to me that the bug is now fixed: const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
alignItems: "center",
backgroundColor: "#F5FCFF"
},
welcome: {
fontSize: 48,
textAlign: "center",
margin: 10,
color: "red",
lineHeight: 60,
textTransform: "lowercase"
},
instructions: {
textAlign: "center",
marginBottom: 5,
lineHeight: 20,
color: "green",
textTransform: "uppercase"
}
}); |
Great, thanks @kristerkari! |
Thanks, also works for me. |
100%! thank you! |
What I found is |
Environment
Description
React Native 0.57.4 brings support for using
textTransform
style property on Android. When settingtextTransform
value touppercase
,lowercase
orcapitalize
the text is not shown at all on Android, but is shown correctly on iOS.If the
textTransform
property is removed, then the text renders normally.This can be easily reproduced by creating a new React Native project and setting the
textTransform
property to one of the texts insideApp.js
.Screenshots:
iOS simulator (iPhone 8 / iOS 12):
Android emulator (Nexus 5X / Android 5.0):
Android emulator (Nexus 5X / Android 8.0):
Reproducible Demo
Have a look at the demo that is a new 0.57.4 project with
textTransform
added to the welcome text.https://github.com/kristerkari/react-native-text-transform-issue/blob/master/App.js#L43
The text was updated successfully, but these errors were encountered: