Skip to content

Textfield cursor position problem on RTL #23812

@ozc

Description

@ozc

On a multilanguage app TextField works correctly if the app language direction is the same as keyboard language direction. But if the directions do not match cursor position is an issue.

Example:
App Language=Hebrew (RTL)
Keyboard = Hebrew
The text is added and removed at the end (left) correctly.

App Language=Hebrew (RTL)
Keyboard = English
When TextField getting focus, if the text is in Latin chars, the cursor is at the start (right). When new characters are entered, the cursor moves to the end (left) and new Latin characters are entered as left to right

eg.
Text1
[Tap on text field]
Text1[cursor]
[Add new text]
Abc[cursor]Text1
Abcde[cursor]Text1
Abcdef[cursor]Text1

Hope I have explained the issue.

Same happens on opposite language/keyboard pairs.

> flutter doctor -v
[✓] Flutter (Channel master, v0.10.2-pre.121, on Mac OS X 10.13.6 17G65, locale en-TR)
    • Flutter version 0.10.2-pre.121 at /Users/ozc/Development/flutter
    • Framework revision b20e7a2671 (14 hours ago), 2018-10-31 07:06:05 -0700
    • Engine revision 3a67757300
    • Dart version 2.1.0 (build 2.1.0-dev.8.0 bf26f760b1)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /Users/ozc/Library/Android/sdk/
    • Android NDK at /Users/ozc/Library/Android/sdk/ndk-bundle
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/ozc/Library/Android/sdk/
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.0, Build version 10A255
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.2

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 28.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2018.2.1)
    • IntelliJ at /Users/ozc/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 26.0.3
    • Dart plugin version 182.3569.4

[✓] VS Code (version 1.26.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.14.0

[✓] Connected device (1 available)
    • Android SDK built for x86 64 • emulator-5554 • android-x64 • Android 5.0.2 (API 21)
      (emulator)

• No issues found!

> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: text inputEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions