Skip to content

Conversation

@xster
Copy link
Member

@xster xster commented Feb 21, 2019

Description

This is a retake of #26001

Allows the long press gesture to move after being accepted.

Use on iOS to move text field cursor. Use on Android to expand selections of words on text fields.

Left #26394 for Android

Related Issues

Fixes #20693.

Checklist

Before you create this PR confirm that it meets all requirements listed below
by checking the relevant checkboxes ([x]). This will ensure a smooth and quick
review process.

  • I read the Contributor Guide and followed the process outlined there for
    submitting PRs.
  • My PR includes tests for all changed/updated/fixed behaviors (See
    Test Coverage).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze --flutter-repo) does not report any
    problems on my PR.
  • I read and followed the Flutter Style Guide, including
    Features we expect every widget to implement.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps
to accommodate your change?

LongPressGestureRecognizers will start to emit onLongPressUp even after the gesture moved after the long press is accepted by default unless a different postAcceptSlopTolerance value is given in the constructor.

@xster xster requested review from Hixie and goderbauer February 21, 2019 02:39
@zoechi zoechi added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. f: cupertino flutter/packages/flutter/cupertino repository f: gestures flutter/packages/flutter/gestures repository. labels Feb 21, 2019
@xster xster force-pushed the rework-long-press-drag branch from 5bd41fc to c567df0 Compare February 21, 2019 19:20
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass-through with just some nits.

This should probably get the label "API break". Did you already send out communications regarding this break?

@xster xster added the c: API break Backwards-incompatible API changes label Feb 22, 2019
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if the breaking change has been communicated.

this.onDoubleTap,
this.onLongPress,
this.onLongPressUp,
this.onLongPressStart,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't like this suggestion? :)

@xster xster merged commit ec00e97 into flutter:master Feb 25, 2019
@xster xster deleted the rework-long-press-drag branch February 25, 2019 22:34
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: text input Entering text in a text field or keyboard related problems c: API break Backwards-incompatible API changes f: cupertino flutter/packages/flutter/cupertino repository f: gestures flutter/packages/flutter/gestures repository. f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

It's not possible to move the cursor in a text field by dragging

4 participants