Skip to content

Center aligned TextField shows caret in the middle when text end with space. #24456

Closed

Description

@yohom

Steps to Reproduce

  • TextField with center aligned.
  • input some text end with a space.
  • caret jumps to middle.

nkia8-tozpl

[✓] Flutter (Channel beta, v0.11.3, on Mac OS X 10.14.1 18B75, locale en-CN)
    • Flutter version 0.11.3 at /Users/yohom/Library/Flutter/flutter
    • Framework revision 72bf075e8d (7 days ago), 2018-11-09 20:36:17 -0800
    • Engine revision 5646e86a6f
    • Dart version 2.1.0 (build 2.1.0-dev.9.3 9c07fb64c4)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /Users/yohom/Library/Android/sdk
    • Android NDK at /Users/yohom/Library/Android/sdk/ndk-bundle
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/yohom/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-1136-b06)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 2.0.0
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 30.0.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[!] IntelliJ IDEA Ultimate Edition (version 2018.2.6)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    • Dart plugin version 182.5124
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

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

Activity

  1. added
    a: text inputEntering text in a text field or keyboard related problems
    on Nov 19, 2018
  2. added this to the milestone on Nov 19, 2018
  3. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Nov 19, 2018
  4. GaryQian commented on Nov 19, 2018

    @GaryQian
    Contributor

    This could have to do with text affinity/upstream vs downstream positions. I can take a look when I get a chance. Thanks for reporting!

  5. mploigt commented on Dec 7, 2018

    @mploigt

    The problem still exists and makes using a center aligned text field impossible. Any idea on when this could be fixed?

  6. zoechi commented on Dec 7, 2018

    @zoechi
    Contributor

    Similar to #22496

  7. GaryQian commented on Dec 7, 2018

    @GaryQian
    Contributor

    The PR linked above works closely in this domain. I can see if it fixes it or if it doesn't, I may be able to modify it to fix it.

    The PR is currently waiting to land.

  8. GaryQian commented on Dec 7, 2018

    @GaryQian
    Contributor

    I have added changes that ensures #24797 does indeed fix this. Thanks for reporting!

  9. GaryQian commented on Dec 10, 2018

    @GaryQian
    Contributor

    I moved the whitespace handling fix into LibTxt: flutter-team-archive/engine#7164

    This change has landed, and will be rolled into the framework soon, after which this specific behavior will will be fixed

  10. GaryQian commented on Dec 12, 2018

    @GaryQian
    Contributor

    The change has rolled into the framework by 390ded9

  11. added
    engineflutter/engine related. See also e: labels.
    on Dec 13, 2018
  12. pablote commented on Jan 11, 2019

    @pablote

    Any idea when this is landing on the beta channel? thanks

  13. github-actions commented on Aug 14, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  14. locked as resolved and limited conversation to collaborators on Aug 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: text inputEntering text in a text field or keyboard related problemsengineflutter/engine related. See also e: labels.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