Skip to content

Dragging the iOS text selection handles is jumpy #106703

@justinmc

Description

@justinmc

Dragging the handles horizontally in a multi-line text field on iOS is really inaccurate and not smooth.

out

This definitely didn't happen before, so I've marked it as a regression. Android doesn't seem to have the same problem. It also doesn't seem to happen on the first line of text.

Steps to reproduce

  1. Run any app with a multiline text field on iOS, such as the one below.
  2. Enter a few lines of text.
  3. Select some text.
  4. Drag either handle in a horizontal direction back and forth a few times

Expected: The selection and handle follow the pointer smoothly.
Actual: The selection and handle pause and jump around.

Code
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: 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 StatelessWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            TextField(minLines: 1, maxLines: 4),
          ],
        ),
      ),
    );
  }
}

CC @antholeole who discovered this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: text inputEntering text in a text field or keyboard related problemsc: regressionIt was better in the past than it is nowf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.platform-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