-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found 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 onteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
The left/right arrow keys should move the caret left/right respectively, regardless of the text direction. In Flutter they move in the wrong direction in RTL text.
The methods that handle this in RenderEditable should be updated to perform the correct behavior without being renamed. So for example, the method _moveGivenSelectionLeft actually moves the selection upstream right now, not necessarily left. It should be modified to move the selection left like it says. This is out of date, see below.
Steps to Reproduce
- Run the app below, which is just a TextField with some Arabic text in it, on a device with arrow keys.
- Try to navigate with the left and right arrow keys.
Expected results: The cursor moves left with the left key and right with the right key. Tested on TextEdit on a Mac after changing my keyboard to Arabic.
Actual results: The cursor movement direction is reversed.
Code
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
final TextEditingController controller = TextEditingController(text: 'شسيب');
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: TextField(
controller: controller,
),
),
),
);
}
}PollexLee, bar4488, MajedDH, tgucio, Milad-Akarie and 10 more
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found 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 onteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team