Skip to content

Fix text selection in search bar #128332

Closed

Description

@MaxYablochkin

#91605

Use case

  1. To get focus on the text, you need to hold your finger near the vertical text input indicator, and then move your finger to either side. After that, a slider and a magnifier will appear.
example to reproduce the problem
Screenrecorder-2023-06-06-18-09-08-648.mp4
  1. In order to be able to select text using the sliders, you must first perform the action described in the first paragraph, and then click on the slider that appears and select "Select all". After that, a magnifying glass and text selection sliders will appear.
example to reproduce the problem
Screenrecorder-2023-06-06-18-10-15-338.mp4

Proposal

Fix the problems described in the first and second paragraphs that cause difficulties when editing text in a TextField in the search view.

Activity

  1. added
    in triagePresently being triaged by the triage team
    on Jun 7, 2023
  2. huycozy commented on Jun 7, 2023

    @huycozy
    Member

    Thanks for filing the issue. This looks like a bug rather than a proposal.

    This issue is reproducible on the latest stable and master channels with sample code in SearchAnchor-class.

    flutter doctor -v (stable and master)
    [✓] Flutter (Channel stable, 3.10.3, on macOS 13.0.1 22A400 darwin-x64, locale en-VN)
        • Flutter version 3.10.3 on channel stable at /Users/huynq/Documents/GitHub/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision f92f44110e (3 days ago), 2023-06-01 18:17:33 -0500
        • Engine revision 2a3401c9bb
        • Dart version 3.0.3
        • DevTools version 2.23.1
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
        • Android SDK at /Users/huynq/Library/Android/sdk
        • Platform android-33, build-tools 32.0.0
        • ANDROID_HOME = /Users/huynq/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.3)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 14E222b
        • CocoaPods version 1.11.3
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.2)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    
    [✓] VS Code (version 1.78.2)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.66.0
    
    [✓] Connected device (2 available)
        • macOS (desktop) • macos  • darwin-x64     • macOS 13.0.1 22A400 darwin-x64
        • Chrome (web)    • chrome • web-javascript • Google Chrome 114.0.5735.90
    
    [✓] Network resources
        • All expected network resources are available.
    
    • No issues found!
    [!] Flutter (Channel master, 3.11.0-20.0.pre.12, on macOS 13.0.1 22A400 darwin-x64, locale en-VN)
        • Flutter version 3.11.0-20.0.pre.12 on channel master at /Users/huynq/Documents/GitHub/flutter_master
        ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
        ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision a89d475ca2 (4 hours ago), 2023-06-05 19:34:09 -0400
        • Engine revision 2b353ae907
        • Dart version 3.1.0 (build 3.1.0-163.0.dev)
        • DevTools version 2.24.0
        • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
        • Android SDK at /Users/huynq/Library/Android/sdk
        • Platform android-33, build-tools 32.0.0
        • ANDROID_HOME = /Users/huynq/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.3)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 14E222b
        • CocoaPods version 1.11.3
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.2)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    
    [✓] VS Code (version 1.78.2)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.66.0
    
    [✓] Connected device (4 available)
        • RMX2001 (mobile) • EUYTFEUSQSRGDA6D                         • android-arm64  • Android 11 (API 30)
        • iPhone (mobile)  • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios            • iOS 15.7.2 19H218
        • macOS (desktop)  • macos                                    • darwin-x64     • macOS 13.0.1 22A400 darwin-x64
        • Chrome (web)     • chrome                                   • web-javascript • Google Chrome 114.0.5735.90
    
    [✓] Network resources
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
  3. added
    a: text inputEntering text in a text field or keyboard related problems
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: material_uimaterial_ui package in flutter/packages
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    and removed
    in triagePresently being triaged by the triage team
    on Jun 7, 2023
  4. justinmc commented on Jun 8, 2023

    @justinmc
    Contributor

    CC @Renzo-Olivares from triage

  5. changed the title [-]Fix focus and highlight text sliders in search view when pressed or held[/-] [+]Fix text selection in search view[/+] on Aug 23, 2023
  6. changed the title [-]Fix text selection in search view[/-] [+]Fix text selection in search bar[/+] on Aug 24, 2023
  7. BananaMasterz commented on Oct 3, 2023

    @BananaMasterz

    This is indeed a bug and quite important since it renders this widget unusable for any real-world use. Maybe label it as a bug? (also if somebody is on it, maybe add autoFocus as well. Should be pretty easy cuz it's based on TextField)

  8. mat100payette commented on Oct 26, 2023

    @mat100payette

    Is this like high priority or what? This is a major functionality of any basic text field/search bar; how is it broken even on Stable channel after 4 months???

    Fyi: it's also broken on web (even in the docs linked by OP), can't do basic text selection.

  9. added
    r: fixedIssue is closed as already fixed in a newer version
    on Nov 10, 2023
  10. github-actions commented on Nov 24, 2023

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

  11. locked as resolved and limited conversation to collaborators on Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

a: text inputEntering text in a text field or keyboard related problemsfound in release: 3.10Found to occur in 3.10found in release: 3.11Found to occur in 3.11frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions