Skip to content

Add triple-tap gesture to select paragraph #2708

@TSchattschneider

Description

@TSchattschneider

Have you checked for an existing issue?

Use case

Triple-tap to select paragraph is missing from QuillEditor, despite being standard behavior in iOS/macOS text fields, Google Docs, Word, and most modern text editors. Currently users must long-press and drag to select a full paragraph.

Proposal

Implement triple-tap gesture detection to select the entire paragraph (Quill document node), following the existing gesture pattern architecture.

Implementation Details

Changes:

  • Extends consecutive tap detection: _doubleTapTimer_consecutiveTapTimer with tap count tracking
  • Adds selectParagraph() and selectParagraphAtPosition() methods to RenderEditor
  • 3 files changed: +112 lines, -25 lines

Edge cases handled:

  • Excludes trailing newlines from selection

Consistent with other selection behavior:

  • Tapping past end of text produces collapsed cursor
  • Respects Quill node boundaries
  • Shows toolbar automatically after selection

I have a working implementation ready: https://github.com/elea-ai/flutter-quill/tree/feature/triple-tap-to-select-paragraph

Rationale

  • Standard UX pattern
  • Backwards compatible - Only adds new gesture, doesn't change existing single/double-tap behavior
  • Follows existing patterns - Mirrors selectWord() implementation and gesture detection architecture

Do you require any other adjustments to meet project standards?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions