Repository navigation
Windows word modifier inconsistencies #78572
Copy link
Copy link
Open
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.1Found to occur in 2.1Found to occur in 2.1frameworkflutter/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 onplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-windowsOwned by the Windows platform teamOwned by the Windows platform teamtriaged-windowsTriaged by the Windows platform teamTriaged by the Windows platform team
Description
On Windows, navigating through text with the arrow keys while holding control behaves slightly differently than other platforms, and Flutter misses this. Windows jumps to the start of the next word in either direction, while other platforms jump to the end of words when moving right and the beginning of words when moving left.
Steps to Reproduce
- Run the app below on Windows, which is just a TextField with "word word word" in it.
- Focus the field and put the cursor at the start.
- Hold the word modifier key (ctrl on Windows, option on Mac) and press the right arrow key.
Expected results: "word |word word"
Actual results: "word| word word"
This is the correct behavior on all other platforms, but not on Windows.
Code
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
final TextEditingController controller = TextEditingController(text: 'word word word');
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: TextField(
controller: controller,
),
),
),
);
}
}Test on Windows 10 using Notepad.
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.1Found to occur in 2.1Found to occur in 2.1frameworkflutter/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 onplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-windowsOwned by the Windows platform teamOwned by the Windows platform teamtriaged-windowsTriaged by the Windows platform teamTriaged by the Windows platform team
Activity
TahaTesser commentedon Mar 24, 2021
I can reproduce the inconsistent behaviour on Windows 10 on the latest
master. On Mac, cursor directly jump to the end when pressing command + right arrowflutter doctor -v
[✓] Flutter (Channel master, 2.1.0-13.0.pre.234, on Microsoft Windows [Version 10.0.19042.867], locale en-US) • Flutter version 2.1.0-13.0.pre.234 at C:\Users\Taha\Code\flutter_master • Framework revision 515ef91ba1 (45 minutes ago), 2021-03-24 04:59:57 -0700 • Engine revision d59a01d2d3 • Dart version 2.13.0 (build 2.13.0-150.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at C:\Users\Taha\Code\SDK • Platform android-30, build-tools 30.0.3 • ANDROID_HOME = C:\Users\Taha\Code\SDK • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) • All Android licenses accepted. [✓] Chrome - develop for the web • Chrome at C:\Users\Taha\AppData\Local\Google\Chrome\Application\chrome.exe [✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.2) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community • Visual Studio Community 2019 version 16.9.31112.23 • Windows 10 SDK version 10.0.18362.0 [✓] Android Studio (version 4.1.0) • Android Studio at C:\Users\Taha\Code\android-studio • 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 1.8.0_242-release-1644-b01) [✓] VS Code (version 1.54.3) • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.20.0 [✓] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19042.867] • Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.90 • Edge (web) • edge • web-javascript • Microsoft Edge 89.0.774.45 • No issues found!flutter-triage-bot commentedon Jun 7, 2024
The
triaged-desktoplabel is irrelevant if there is noteam-desktoplabel orfyi-desktoplabel.