Skip to content

Gboard "select" text feature does not select text #185849

@Renzo-Olivares

Description

@Renzo-Olivares

Steps to reproduce

  1. Run code sample on physical Android device with Gboard.
  2. Access the text editing menu in Gboard.
  3. Press "select".
  4. Use arrow keys to expand the selection in a given direction.

Bisected to: 823b47d

Expected results

Pressing "select" and then using the Gboard software arrow keys should begin to expand the selection in the direction of the arrow keys.

Actual results

Pressing "select" and then using the Gboard software arrow keys does not expand the selection.

Code sample

import 'package:flutter/material.dart';

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

class SimpleTextFieldApp extends StatelessWidget {
  const SimpleTextFieldApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Simple TextField',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
        useMaterial3: true,
      ),
      home: const TextFieldScreen(),
    );
  }
}

class TextFieldScreen extends StatefulWidget {
  const TextFieldScreen({super.key});

  @override
  State<TextFieldScreen> createState() => _TextFieldScreenState();
}

class _TextFieldScreenState extends State<TextFieldScreen> {
  // The controller gives you access to the text the user types
  final TextEditingController _textController = TextEditingController();

  @override
  void dispose() {
    // Always dispose of the controller to prevent memory leaks
    _textController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Single TextField')),
      body: Center(
        child: Padding(
          padding: const EdgeInsets.all(24.0),
          child: TextField(
            controller: _textController,
            decoration: const InputDecoration(
              labelText: 'Enter your text',
              hintText: 'Type something here...',
              border: OutlineInputBorder(),
            ),
          ),
        ),
      ),
    );
  }
}

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: text inputEntering text in a text field or keyboard related problemsc: regressionIt was better in the past than it is nowf: selectionSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsframeworkflutter/packages/flutter repository. See also f: labels.fyi-text-inputFor the attention of Text Input teamplatform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions