Skip to content

Conversation

@Renzo-Olivares
Copy link
Contributor

@Renzo-Olivares Renzo-Olivares commented Aug 22, 2024

Fixes an issue where Flutter TextField may crash on iOS after a horizontal drag that does not meet the drag threshold to win the gesture arena, leaving the TextField in a weird state that does not accept tap gestures.

Fixes #153939

Cherry-pick of: #151989

Related issue: #153458

…sing gesture arena (flutter#151989)

This PR properly resets the drag state when losing the gesture arena or when the recognizer stops tracking the current pointer. The _dragState enum was reset properly, but I had forgotten to also reset the `_start`, this caused an issue when the recognizer won the gesture arena the next time, as it tries to detect a drag given the old `_start` in `acceptGesture`, but the `_dragState` has been reset causing an assertion to trigger.
@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: gestures flutter/packages/flutter/gestures repository. labels Aug 22, 2024
@Renzo-Olivares Renzo-Olivares marked this pull request as ready for review August 22, 2024 16:03
@reidbaker reidbaker requested a review from justinmc August 26, 2024 17:25
@reidbaker reidbaker added the cp: review Cherry-picks in the review queue label Aug 26, 2024
Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

CP LGTM 👍 Should be very low risk.

@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 27, 2024
@auto-submit auto-submit bot merged commit bc472b4 into flutter:flutter-3.24-candidate.0 Aug 27, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 4, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App cp: review Cherry-picks in the review queue f: gestures flutter/packages/flutter/gestures repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants