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
Inconsistent text-transform: capitalize behaviour #7059
Comments
@lambourn marking this one as a bug as it looks like that the splitting words on Android is not cognitive enough to recognize different ones when a dash is used. |
@NickIliev agreed. Even the iOS implementation does not produce what I would expect as it also does automatic lower-case on the last word (Bug vs BUG) - but that's due to the underlying NSString implementation. But here I think the Android implementation should produce the same as on iOS. |
I'm currently working on it. Just having some issues with tests. |
make it consistent for android and ios fix NativeScript#7059
Environment
Describe the bug
When using
text-transform: capitalize
on label/text/button/etc. UI elements, the behaviour on iOS and Android inconsistent and wrong on Android.On Android, the source string is split on " " (space) to get an array of words, then each word gets lower-cased(!), then the first character of each word gets upper-cased.
On iOS, a platform native function is used which which uses a different/hidden implementation.
To Reproduce
This produces
This Is Kind-Of-Magic - Or A Bug?
This Is Kind-of-magic - Or A Bug
?Expected behavior
I would expect the display of
This Is Kind-Of-Magic - Or A BUG?
Sample project
https://play.nativescript.org/?template=play-tsc&id=pb9SJ0&v=6
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: