Skip to content

Vertical dragging to select text #28676

@mdebbar

Description

@mdebbar

This PR adds support for text selection by dragging with a mouse. The current implementation only supports horizontal dragging since vertical dragging will most likely conflict with scrolling.

The solution is to make it so that scrolling is only triggered when initiated by touch events, and vertical text selection is only triggered by a mouse. No conflicts!

But with the current state of Flutter, we can't disable mouse-drag-to-scroll yet because there is no other way to scroll on desktop. Once wheel scrolling is fully implemented, we can revisit this.

  • wheel scroll.
  • scroll bars.
  • disable drag-to-scroll when the device is a mouse.
  • enable text selection by dragging in any direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: desktopRunning on desktopc: proposalA detailed proposal for a change to Flutterf: gesturesflutter/packages/flutter/gestures repository.f: scrollingViewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.platform-webWeb applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions