Skip to content

Cursor position lower than expected when TextField is empty #61715

Closed as not planned

Description

@guidezpl

I discovered this issue while implementing cursor height. With large cursors, it becomes obvious that the cursor is abnormally positioned for empty TextFields, and 'jumps' after a character is entered.

running on macOS:
https://user-images.githubusercontent.com/6655696/103345325-67602680-4a91-11eb-9ae4-91bd1069ada6.mp4

Bottom uses a large cursor, top uses a very large cursor

cc: @justinmc @GaryQian

Related to #64072

Activity

  1. added
    a: text inputEntering text in a text field or keyboard related problems
    p: material_uimaterial_ui package in flutter/packages
    p: cupertino_uicupertino_ui package in flutter/packages
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Jul 17, 2020
  2. justinmc commented on Jul 17, 2020

    @justinmc
    Contributor

    Thanks for catching this. It sounds like you can reproduce this just by setting a large cursorHeight in an otherwise normal TextField? I'll try to reproduce it once #61714 is merged.

    TextField(
      cursorHeight: 40.0,
    )
  3. VladyslavBondarenko commented on Jul 23, 2020

    @VladyslavBondarenko

    Reproduces with current master 1.21.0-2.0.pre.114, visible when cursorHeight is significantly bigger than fontSize.

    flutter doctor -v
    [✓] Flutter (Channel master, 1.21.0-2.0.pre.114, on Mac OS X 10.15.6 19G73, locale en-GB)
        • Flutter version 1.21.0-2.0.pre.114 at /Users/nevercode/dev/flutter
        • Framework revision ddb8e6e3bf (7 hours ago), 2020-07-22 20:00:07 -0700
        • Engine revision dcc9a4048d
        • Dart version 2.9.0 (build 2.9.0-21.0.dev 9dca49e71e)
    
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
        • Android SDK at /Users/nevercode/Library/Android/sdk
        • Platform android-29, build-tools 29.0.3
        • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 11.6)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 11.6, Build version 11E708
        • CocoaPods version 1.9.1
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 4.0)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 47.1.2
        • Dart plugin version 193.7361
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    
    [✓] VS Code (version 1.47.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.12.2
    
    [✓] Connected device (5 available)
        • Redmi Note 7 (mobile)      • 6345c469                             • android-arm64  • Android 9 (API 28)
        • iPhone 11 Pro Max (mobile) • 55C8466B-5367-492B-8EFE-EC45D980571F • ios            • com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator)
        • macOS (desktop)            • macos                                • darwin-x64     • Mac OS X 10.15.6 19G73
        • Web Server (web)           • web-server                           • web-javascript • Flutter Tools
        • Chrome (web)               • chrome                               • web-javascript • Google Chrome 84.0.4147.89
    
    • No issues found!
    
  4. guidezpl commented on May 23, 2022

    @guidezpl
    MemberAuthor

    This isn't specifically related to customizing cursor height, but it is more noticeable. Since another issue has more discussion/info, closing as duplicate of #92080

  5. github-actions commented on Jun 6, 2022

    @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.

  6. locked as resolved and limited conversation to collaborators on Jun 6, 2022
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 problemsfound in release: 1.21Found to occur in 1.21frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: cupertino_uicupertino_ui package in flutter/packagesp: material_uimaterial_ui package in flutter/packages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions