Repository navigation
TextField: issues with selection using shift+mouse click on the web #91979
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: desktopRunning on desktopRunning on desktopa: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsfound in release: 2.5Found to occur in 2.5Found to occur in 2.5found in release: 2.6Found to occur in 2.6Found to occur in 2.6frameworkflutter/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/packages
Description
Steps to Reproduce
- Execute the code sample
- Enter text to the text field (e.g. copy paste code sample to it)
- Move cursor to the start of the TextField
- Hold shift and click on to the end of the word
Expected results:
The word should be selected
Actual results:
The cursor just moved to the new place without selecting the text
Code sample
TextField(
maxLines: 8,
decoration: InputDecoration.collapsed(hintText: "Enter your text here"),
);Gist - https://dartpad.dev/?id=f47ec8a65b32abbd7646831d65311724&null_safety=true
Logs
info • Use key in widget constructors • lib/main.dart:9:7 • use_key_in_widget_constructors
info • Use key in widget constructors • lib/main.dart:26:7 • use_key_in_widget_constructors
flutter doctor -v
[✓] Flutter (Channel stable, 2.5.2, on macOS 11.6 20G165 darwin-x64, locale en)
• Flutter version 2.5.2 at /Users/aydar/Documents/tools/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 3595343e20 (2 weeks ago), 2021-09-30 12:58:18 -0700
• Engine revision 6ac856380f
• Dart version 2.14.3
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc2)
• Android SDK at /Users/aydar/Library/Android/sdk
• Platform android-30, build-tools 31.0.0-rc2
• ANDROID_HOME = /Users/aydar/Library/Android/sdk
• Java binary at: /Users/aydar/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7784292/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.5, Build version 12E262
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Users/aydar/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7784292/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 11.0.10+0-b96-7281165)
[✓] Android Studio (version 2020.3)
• Android Studio at /Users/aydar/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7784292/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 11.0.10+0-b96-7281165)
[✓] VS Code (version 1.60.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (1 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 94.0.4606.81
• No issues found!
Screen.Recording.2021-10-18.at.10.01.45.mov
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: desktopRunning on desktopRunning on desktopa: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsfound in release: 2.5Found to occur in 2.5Found to occur in 2.5found in release: 2.6Found to occur in 2.6Found to occur in 2.6frameworkflutter/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/packages
Activity
danagbemava-nc commentedon Oct 18, 2021
Issue is reproducible on
stableandmaster.I can reproduce it in
chromeandmacOS.code sample
flutter doctor -v
yjbanov commentedon Oct 18, 2021
/cc @cbracken
cbracken commentedon Oct 18, 2021
/cc @dkwingsmt
dkwingsmt commentedon Oct 20, 2021
Has it ever worked in previous versions? I don't see any code implementing it.
Nevertheless this is a valid feature.
justinmc commentedon Dec 10, 2021
In order for this issue to be considered complete, we should also support shift + click + drag. Natively this extends the selection created by the shift + click.
#93835 will implement shift + tap and I'll follow up with another PR to add the drag.
github-actions commentedon Feb 18, 2022
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.