Skip to content

SelectableText has no selection handle on iOS when long press, only appears after choosing selecting all text  #62658

Closed

Description

@nathanael-h

Steps to Reproduce

  1. Create a new app with
    flutter create myapp
  2. In the main.dart, replace text with selectabletext :
SelectableText(
   'You have pushed the button this many'
),
  1. Run on Android, long press on the sentence, you can select and there are handles.
  2. Run on iOS, long press on the sentence, you can hit select all, and now you have all the text selected and handles are visible ; but there just after long press on text there is no handles, so you can not easily select just a few words.

Expected results:
I expect to have handles on iOS to select the text I want.

Actual results:
On iOS there is no handle. I can only hit select all, then reduce the selection.

Related to #59600

Hello @justinmc as you asked me in this message #59600 (comment) I create this new issue. I did not took new screenshots, as they would have been the same as in the issue #59600. Is it ok for you ?

flutter doctor -v

[✓] Flutter (Channel master, 1.21.0-6.0.pre.96, on Mac OS X 10.15.5 19F101,
    locale fr-FR)
    • Flutter version 1.21.0-6.0.pre.96 at /Users/user921712/Downloads/flutter
    • Framework revision a4d570f0dd (il y a 2 jours), 2020-07-29 08:26:05 -0700
    • Engine revision a9910e409c
    • Dart version 2.10.0 (build 2.10.0-1.0.dev 24c7666def)

 
[!] Android toolchain - develop for Android devices (Android SDK version 26.0.1)
    • Android SDK at /usr/local/Caskroom/android-sdk/3859397,26.0.1
    ✗ Flutter requires Android SDK 28 and the Android BuildTools 28.0.3
      To update using sdkmanager, run:
        "/usr/local/Caskroom/android-sdk/3859397,26.0.1/tools/bin/sdkmanager"
        "platforms;android-28" "build-tools;28.0.3"
      or visit https://flutter.dev/docs/get-started/install/macos#android-setup
      for detailed instructions.
    ✗ Android licenses not accepted.  To resolve this, run: flutter doctor
      --android-licenses

[✓] 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

[!] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

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

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

[✓] Connected device (1 available)
    • macOS (desktop) • macos • darwin-x64 • Mac OS X 10.15.5 19F101


Activity

  1. nathanael-h commented on Jul 31, 2020

    @nathanael-h
    Author

    Hello, @TahaTesser maybe the triage should be quite easy for this issue as I created it at the behest of Justin McCandless, see on previous message.

  2. TahaTesser commented on Jul 31, 2020

    @TahaTesser
    Contributor
    Code Sample
    import 'package:flutter/material.dart';
    
    void main() => runApp(MyApp());
    
    class MyApp extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: 'Material App',
          theme: ThemeData.dark(),
          home: Home(),
        );
      }
    }
    
    class Home extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          appBar: AppBar(
            title: Text('Material App Bar'),
          ),
          body: Center(
            child: SelectableText('You have pushed the button this many'),
          ),
        );
      }
    }
    
    
    flutter doctor -v
    [✓] Flutter (Channel master, 1.21.0-6.0.pre.129, on Mac OS X 10.15.6 19G73,
        locale en-GB)
        • Flutter version 1.21.0-6.0.pre.129 at
          /Users/tahatesser/Code/flutter_master
        • Framework revision 30aef0a3b9 (15 hours ago), 2020-07-30 14:20:21 -0700
        • Engine revision a9910e409c
        • Dart version 2.10.0 (build 2.10.0-1.0.dev 24c7666def)
    
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
        • Android SDK at /Users/tahatesser/Code/sdk
        • Platform android-30, build-tools 30.0.1
        • ANDROID_HOME = /Users/tahatesser/Code/sdk
        • 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.3
    
    [✓] 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.3)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.13.0
    
    [✓] Connected device (5 available)
        • SM M305F (mobile)  • 32003c30dc19668f                     • android-arm64
          • Android 10 (API 29)
        • iPhone 11 (mobile) • 7863E29F-EEE8-499E-BB28-6B111B76E3EE • 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.105
    
    • No issues found!
    
  3. changed the title [-]SelectableText has no selection handle on iOS when long press (2nd issue)[/-] [+]SelectableText has no selection handle on iOS when long press, only appears after choosing selecting all text [/+] on Jul 31, 2020
  4. added
    a: fidelityMatching the OEM platforms better
    a: typographyText rendering, possibly libtxt
    p: material_uimaterial_ui package in flutter/packages
    frameworkflutter/packages/flutter repository. See also f: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    platform-iosiOS applications specifically
    on Jul 31, 2020
  5. nathanael-h commented on Aug 17, 2020

    @nathanael-h
    Author

    Hello @justinmc do you have any update on this issue ?

  6. justinmc commented on Aug 17, 2020

    @justinmc
    Contributor

    @chunhtai Should SelectableText select on long press, or just show "Select All"? It seems like the native behavior is to select on long press on iOS, the same as we do now for double tap.

  7. justinmc commented on Aug 17, 2020

    @justinmc
    Contributor

    @nathanael-h Thanks for the reminder! Let me double confirm the correct behavior, then I think it should be a fairly small change to get this fixed.

  8. chunhtai commented on Aug 17, 2020

    @chunhtai
    Contributor

    @justinmc I think we should match the native. I remember it used to select the whole word when long press

  9. justinmc commented on Aug 17, 2020

    @justinmc
    Contributor

    Ok got it, thanks. I'll mark this as a regression and try to take a look.

  10. self-assigned this
    on Aug 17, 2020
  11. github-actions commented on Aug 13, 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.

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

Metadata

Metadata

Assignees

Labels

a: fidelityMatching the OEM platforms bettera: typographyText rendering, possibly libtxtc: regressionIt was better in the past than it is nowfound 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: material_uimaterial_ui package in flutter/packagesplatform-iosiOS applications specifically

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions