Skip to content

SelectionArea cursor should only change when over text #104594

Closed
@guidezpl

Description

@guidezpl

Great feature, just found a couple of minor bugs.

Expected

The cursor should only change when over text.

Actual

Currently, when the cursor is over a selectable widget such as Text, the cursor changes to a text selection cursor over the entire area taken by the widget.

Take the following for example:

import 'package:flutter/material.dart';

class SelectionAreaExpandedRepro extends StatelessWidget {
  const SelectionAreaExpandedRepro({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: SelectionArea(
        child: Scaffold(
          body: Row(
            children: const [
              Expanded(
                child: Text('Hello'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
SelectionArea.with.Expanded.Row.mp4

This also applies vertically.

SelectionArea.with.Expanded.Column.mp4

Metadata

Metadata

Assignees

Labels

Bot is counting down the days until it unassigns the issueP2Important issues not at the top of the work listf: selectionSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsframeworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions