-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problems
Description
When dragging the collapsed cursor in a text field on Android and iOS, 1. the loupe does not appear and 2. edge scrolling doesn't work. This is referring to dragging the cursor itself, not dragging the collapsed selection handle (which does work on Android and doesn't exist on iOS).
| Scenario | Dragging the collapsed handle | Dragging the cursor |
|---|---|---|
| Flutter on Android | ✅ ![]() |
❌ ![]() |
| Flutter on iOS | n/a | ❌ ![]() |
Steps to reproduce
- Run any app with multiple lines of editable text, such as the one given below.
- Tap to place the cursor.
- Perform a drag gesture on the cursor.
Expected: The cursor follows the drag, the loupe appears, and edge scrolling works.
Actual: The cursor does follow the drag, but the loupe doesn't appear, and scrolling off the edge causes the cursor to stop following the drag instead of scrolling.
Repro code
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
final TextEditingController _controller = TextEditingController(
text: 'Lorem ipsum dolor sit amet,\nconsetetur sadipscing elitr,\nsed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,\nsed diam voluptua.\nAt vero eos et accusam et justo duo dolores et ea rebum.\nStet clita kasd gubergren,\nno sea takimata sanctus est Lorem ipsum dolor sit amet.',
);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
TextField(
controller: _controller,
minLines: 4,
maxLines: 4,
),
],
),
),
);
}
}Metadata
Metadata
Assignees
Labels
a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problems


