Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Inconsistent text behavior in TextInput between iOS and Android #14845
Is this a bug report?
Have you read the Bugs section of the Contributing to React Native Guide?
(edit: it reproduces in 0.54.2 according to the comments -@hramos)
Steps to Reproduce
Both iOS and Android should exhibit the same behavior and display the beginning of the text when unfocused.
Ideally, the ellipsis should also be an optional parameter to display when unfocused on both Android and iOS.
iOS displays the beginning of the text, ellipsizing the remaining text before truncating.
Android displays the end of the text with no ellipsis at the beginning.
Example project: https://snack.expo.io/S1Lty1oN-
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!
If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.
I can confirm that this is happening on both RN52 and RN54. In Android, this essentially forces the user to read from right to left. Note to Google, in English, we start reading from left to right. In English, we don't start at the end of a sentence and then work our way backwards. This isn't Arabic or Hebrew. I'm baffled why Android would have this as their default... this shouldn't be something the RN team should have to override. I get that Android serves an international audience, but the default should support the more/most common languages' settings.
<?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" tools:context=".MainActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:singleLine="true" android:text="@string/app_name" android:textAppearance="?android:textAppearanceLarge" /> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" android:singleLine="true" android:text="@string/app_name" android:textAppearance="?android:textAppearanceLarge" /> </LinearLayout> </ScrollView>