Skip to content

"Select All" Automatically scrolls EditableText to the end of the text field, which doesn't happen on native iOS #105731

@antholeole

Description

@antholeole

Steps to Reproduce

code sample:

class MyApp extends StatelessWidget {
  final textController =
      TextEditingController(text: lorem(words: 50, paragraphs: 2)); //or just manually input a lot of text, enough to overflow

  MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
          body: Center(
              child: FractionallySizedBox(
        widthFactor: 0.4,
        child: TextField(
          controller: textController,
        ),
      ))),
    );
  }
}
  1. Flutter Run
  2. Long Press on the text Field
  3. Select "Select All"

Expected results:

Should behave like native and not scroll to the end: https://user-images.githubusercontent.com/48811365/172933065-ef0a267a-f5fe-4f8a-a37d-7001ceb6fc11.gif

Actual results:

Flutter automatically scrolls to the end:
https://user-images.githubusercontent.com/48811365/172933198-4aed8242-3da4-4366-b4b6-f4a3ae283cfb.gif

I'll probably just fix this along with #104945 since to fix that this one needs to be fixed, because we can calculate the correct position for the toolbar but it won't be in view anyway

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: fidelityMatching the OEM platforms bettera: text inputEntering text in a text field or keyboard related problemsengineflutter/engine related. See also e: labels.found in release: 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions