Skip to content
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

wrong text align in RTL #1007

Closed
sijad opened this issue Apr 19, 2019 · 2 comments
Closed

wrong text align in RTL #1007

sijad opened this issue Apr 19, 2019 · 2 comments

Comments

@sijad
Copy link

sijad commented Apr 19, 2019

Environment

react-native: 0.59.3
react-native-paper: 2.15.2

Description

this commit changes text align behavior in android.
react-native-paper also try to achieve something similar via styling but now it introduces conflict with that commit and text components (Subheader, Text, etc) renders in apposite direction.

react-native's Text component renders as it should be but react-native-paper text components are not.

@satya164 satya164 added the 3.0 label Apr 19, 2019
@RaheelJaved
Copy link

RaheelJaved commented Apr 22, 2019

as far as the TextInput concerns, seems like it's aligning the text contents based on the actual value entered (the first letter), not the current language.

For example...
input value = "Ahmed", alignment = left
input value = "احمد", alignment = right
input value = "Ahmed احمد", alignment = left
input value = "احمد Ahmed", alignment = right
input value = "123 احمد", alignment = right

This is irrespective of I18nManager.isRTL returns true or false, numbers and special characters also have no effect on alignment

"react-native-paper": "^2.15.2",

Update
Actually you are right. the above behavior is in LTR mode, in RTL its reversed.

@satya164
Copy link
Member

Looks like the change in RN is going to be reverted facebook/react-native#24580

Closing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants