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

iOS TextField issues with RTL text editing #3096

Closed
etolstoy opened this issue Apr 24, 2023 · 3 comments
Closed

iOS TextField issues with RTL text editing #3096

etolstoy opened this issue Apr 24, 2023 · 3 comments
Assignees
Labels
bug Something isn't working ios text

Comments

@etolstoy
Copy link
Contributor

etolstoy commented Apr 24, 2023

There are some issues with handling the RTL text. Sample code:

CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl ) {
    TextField(
        value = text,
        onValueChange = {
            text = it
        }
    )
}

Affected platforms
Select one of the platforms below:

  • iOS

Versions

  • Kotlin version*: 1.8.20
  • Compose Multiplatform version*: 1.4.0

To Reproduce
Bug #1: Type a word. Than press space. In RTL mode the caret jumps to the beginning of the line and a whitespace appears before the actual content. If you continue typing something other than whitespaces, the caret returns to its original position.

rtl-bug

Bug #2: Selection handles behave very weird, both in the whitespace case from bug #1, with other pieces of RTL text and when you try to select all.

photo_2023-04-24 16 51 38 (1)
photo_2023-04-24 16 51 38
photo_2023-04-24 16 51 37
photo_2023-04-24 16 51 36

Related issues:

@hfeky
Copy link

hfeky commented May 4, 2023

This issue also occurs on Desktop.

@hfeky
Copy link

hfeky commented May 4, 2023

RTL text support in Compose has many issues. These are also 2 other RTL text issues.

@dima-avdeev-jb dima-avdeev-jb changed the title TextField issues with RTL text editing iOS TextField issues with RTL text editing Jun 19, 2023
@okushnikov
Copy link
Collaborator

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ios text
Projects
None yet
Development

No branches or pull requests

5 participants