Closed hfeky closed 1 month ago
Thanks!
@eymar, we should probably revert Arrow Left/Right for an RTL text.
@igordmn The keyboard arrow keys are already reverted for RTL text. It works fine for Arabic letters but just not for Arabic digits; it behaves as if it identifies Arabic digits text direction as RTL while it should actually be identified as LTR.
@eymar I was trying to debug the character directionality of Arabic digits like this:
println(Character.getDirectionality('١')) // This returned Character.DIRECTIONALITY_ARABIC_NUMBER.
println(Character.getDirectionality('1')) // This returned Character.DIRECTIONALITY_EUROPEAN_NUMBER.
So the question here is are characters whose directionality is Character.DIRECTIONALITY_ARABIC_NUMBER
classified as LTR text in Compose?
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Bug
I'm developing a desktop app that only supports Arabic language. When I try to enter Arabic digits in a
TextField
, it reverses the text cursor direction when I use the keyboard arrow keys, which confuses the user; left arrow key moves the text cursor to the right, and the right arrow key moves the text cursor to the left. Contrarily, Arabic letters work fine as expected.Example
toArabic()
FunctionIn case it matters, I also have the following wrapped around all other composables for RTL layout direction.
Affected Platform
Not sure if it also affects other platforms or not, but it affects at least Desktop.
Versions
Steps To Reproduce
TextField
composable.Expected Behavior
The text cursor should move to the left.
Actual Behavior
The text cursor moves to the right.