Repository navigation
SelectableText has no selection handle on iOS when long press #59600
Copy link
Copy link
Closed
Labels
a: fidelityMatching the OEM platforms betterMatching the OEM platforms bettera: typographyText rendering, possibly libtxtText rendering, possibly libtxtfound in release: 1.17Found to occur in 1.17Found to occur in 1.17found in release: 1.20Found to occur in 1.20Found to occur in 1.20frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesplatform-iosiOS applications specificallyiOS applications specifically
Description
Steps to Reproduce
- Create a new app with
flutter create myapp - In the main.dart, replace text with selectabletext :
SelectableText(
'You have pushed the button this many
),
- Run on Android, long press on the sentence, you can select and there are handles.
- Run on iOS, long press on the sentence, you can hit select all, but there is no handles.
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.
flutter doctor --verbose
[✓] Flutter (Channel stable, v1.17.3, on Mac OS X 10.14.6 18G4032, locale fr-FR)
• Flutter version 1.17.3 at /Users/user919727/Downloads/flutter
• Framework revision b041144f83 (il y a 12 jours), 2020-06-04 09:26:11 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/user919727/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_212-release-1586-b4-5784211)
• All Android licenses accepted.
[!] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C505
✗ Xcode requires additional components to be installed in order to run.
Launch Xcode and install additional required components when prompted or
run:
sudo xcodebuild -runFirstLaunch
• CocoaPods version 1.9.1
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 46.0.1
• Dart plugin version 192.8052
• Java version OpenJDK Runtime Environment (build
1.8.0_212-release-1586-b4-5784211)
[!] IntelliJ IDEA Community Edition (version 2018.2.6)
• 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.45.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.11.0
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: fidelityMatching the OEM platforms betterMatching the OEM platforms bettera: typographyText rendering, possibly libtxtText rendering, possibly libtxtfound in release: 1.17Found to occur in 1.17Found to occur in 1.17found in release: 1.20Found to occur in 1.20Found to occur in 1.20frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesplatform-iosiOS applications specificallyiOS applications specifically
Activity
TahaTesser commentedon Jun 17, 2020
Hi @nathanael-h
Running on latest stable, no issues
Code Sample
flutter doctor -v
nathanael-h commentedon Jun 17, 2020
Hi @TahaTesser thanks for the reply, and the test you did. I saw no handle on your screenshot. Do you have the possibility to select the text you want, for example select only "the button" on iOS ?
nathanael-h commentedon Jun 17, 2020
Here is a test done tonight. Android is on the left, i can use handles to select text. iOS is on the right, I can only hit select all button, I do not know how to make handles visible o that I could select the text I want.
I did the same test also on flutter master, and it is the same.
flutter doctor :
TahaTesser commentedon Jun 18, 2020
Hi @nathanael-h
Looks like you're using older Xcode and simulator with iOS 13.3, please upgrade
There is no issue on latest
masterand latest Xcode using iPad pro simulatorflutter doctor -v
nathanael-h commentedon Jun 23, 2020
Hello, thanks for catching I was using an outdated xcode version, I upgraded both MacOS and XCode. Unfortunatly, I still have the issue.
Tonight I did this :
flutter channel masterflutter upgradeflutter create myapss2flutter runto run on iOS simulatorScreenshots :
Full main.dart:
Here is flutter doctor -v results:
nathanael-h commentedon Jun 23, 2020
For you information I also tried with an iPad Pro 9.7 simulator, iOS 13.5 and I have the same issue with the code you provided or the one I sent in the previous comment.
Thank you for your kind help.
TahaTesser commentedon Jun 25, 2020
flutter doctor -v
[-]SelectableText has no handle on iOS[/-][+]SelectableText has no selection handle on iOS when long press [/+]1 remaining item
nathanael-h commentedon Jul 22, 2020
Hello @chunhtai as you implemented Selectable Text, could maybe help to triage, to assign, or to solve this issues ? Thank you.
chunhtai commentedon Jul 22, 2020
cc @justinmc I can reproduce this by long press and click select all
nathanael-h commentedon Jul 29, 2020
Hello the PR #62072 fixes this issue partially : the handles now show up after clicking the select all button. Thanks @justinmc for your work.
But when we long press on the text the handles are still not showed. So to select a few words, we actually have to first hit select all then to unselect the unwanted text... I think this issue should be reopen. Tested on latest master right now.
justinmc commentedon Jul 29, 2020
@nathanael-h Thanks for catching that, I don't think I checked that case as part of the PR. Would you mind opening another issue and tagging me?
nathanael-h commentedon Jul 31, 2020
@justinmc Yes, ok, done in #62658 😎 thank you for your kind help.
github-actions commentedon Aug 18, 2021
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 -vand a minimal reproduction of the issue.