Skip to content

spec(AST-094): a cancelled moving touch stays with its recognizer (FR19) - #8978

Merged
cixzhang merged 4 commits into
mainfrom
spec/ast094-moving-cancel
Oct 31, 2026
Merged

cixzhang merged 4 commits into
mainfrom
spec/ast094-moving-cancel

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Exact decision needed

On a phone, someone holds a message to open its menu, then drags away. The hold cancels itself on that move, and today the rest of the drag becomes a page scroll: the list jumps under a finger that was holding still. Does a gesture that cancels itself while its finger is moving keep that finger until it lifts?

Existing authority searched

  • spec:AST-094 FR14 (current): who gets a drag is decided once and never changes hands midway.
  • spec:AST-094 FR19 (current): only an owner may cancel a touch's moves, with three listed exceptions. Whether a cancelled recognizer still owns its moving touch is not stated, so FR14 and FR19 point different ways for this case.
  • spec:AST-094 FR10, FR12, FR15 and FR20 (current), read for pinch-zoom, the long-press tolerance, arbitration and the browser taking a touch; none settles it.

Decision

FR19 gains a fourth exception: a recognizer cancelled while its touch is moving keeps owning that touch until it lifts and may cancel its moves, so the drag never becomes a page scroll midway (FR14). A touch resting when its recognizer is cancelled, and every touch of a waiting recognizer that fails, is still given back, so the page keeps pinch-zoom (FR10). The FR18–FR22 verification row gains the case of a long press dragged past its tolerance after it began.

Rejected alternatives

  • Give the moving touch back to the browser on a cancel: the page takes the drag over midway, which FR14 forbids.

Claim scope and non-goals

  • Only who owns a touch after its recognizer cancels during that touch's move.
  • Unchanged: the browser taking a touch (FR20), the resting-finger and failed-recognizer releases, and every other FR19 exception.

Evidence and implementation relationship

Writing rubric results

  • R1 narration: none; the sentence states behavior in the present tense.
  • R2 research in the record: none.
  • R3 evidence naming a change: none; the new verification case names a behavior, not a change.
  • R4 rejected alternatives over one line or outside a decision: none in the record.
  • R5 pull request or issue references remaining: none in the record.
  • R6 ruled open questions still listing options: none.

Scope

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and artifacts contain no internal Meta context.

Validation

  • pnpm check:knowledge: aligned.
  • Prettier: clean (the verification table's column padding is reformatted by Prettier; its only text change is the new case).
  • git diff --check: clean.

@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 31, 2026 5:47am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 30, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec e9df8b6

@astracat-bot

astracat-bot Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 31, 2026, 3:00 PM UTC

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Changes requested for one wording fix; the direction itself is owner-approved and the record passes the knowledge check. The new FR19 sentence applies to any recognizer "cancelled while its touch is moving", which also covers the active recognizers FR20 cancels when the browser takes a moving touch, so the record would give that touch both to the recognizer and to the browser. Since the description keeps FR20 unchanged, scoping the subject (for example "…, other than by the browser taking that touch (FR20), …") resolves it, and naming the waiting recognizer as FR15 does ("a recognizer that requires another to fail") keeps the sentence in the record's own terms. A new commit needs a fresh /approve-spec on its head.

[Automated review]

Comment on lines +301 to +306
A recognizer that is cancelled while its touch is moving, such as a long
press dragged past its tolerance after it began, keeps owning that touch
until it lifts and MAY cancel its moves, so the drag never becomes a page
scroll midway (FR14); a touch that is resting when its recognizer is
cancelled, and every touch of a waiting recognizer that fails, is given back
(FR10). A

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

FR20 overlap. This subject covers any recognizer "cancelled while its touch is moving", which includes the active recognizers FR20 (lines 319-324) cancels when the browser takes a moving touch: pointercancel, an uncancelable touchmove, or a native scroll past the take distance. For those, this sentence says the recognizer keeps owning the touch and the drag never becomes a page scroll, while FR20 says the browser already has it. The description keeps FR20 unchanged, so scoping the subject resolves it, for example: "A recognizer that is cancelled while its touch is moving, other than by the browser taking that touch (FR20), …". "A waiting recognizer" also appears nowhere else in the record; FR15's "a recognizer that requires another to fail" would name it, and the two subjects take "are given back".

@cixzhang cixzhang closed this Oct 30, 2026
@cixzhang cixzhang reopened this Oct 30, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current change has no visual or preview-producing scope. Visual checks are not applicable; preview links are not shown.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approval waits on an engineering owner's decision for this head: the latest push rewords FR19's new exception, and the earlier /approve-spec named the previous commit, so it no longer applies. The rewording resolves the earlier overlap with FR20, the record passes the knowledge check, and nothing else needs to change. To settle it, an engineering owner comments /approve-spec <full head SHA> on this pull request to approve FR19's fourth exception and the new FR18–FR22 case as worded, or asks for different wording; the author can do this as an engineering owner.

[Automated review]

cixzhang added a commit that referenced this pull request Oct 31, 2026
… the browser (FR20) (#8456)

## Decision

`spec:AST-094` FR20: only a finger's first uncancelable `touchmove` counts as the browser taking the touch, and only when the browser could scroll along the finger's main axis. The main axis is the one the finger has moved farther along since touch-down, horizontal on a tie; the browser could scroll along it when a scroller under the touch has room that way and every `touch-action` between them allows that pan (FR18). Later uncancelable moves of that finger never count. `pointercancel` and a native scroll past the 10 px take distance count as before. One verification row covers a horizontal drag under `pan-y`, a vertical drag under `pan-y` over a scroller with room, and a vertical drag where no scroller has room.

## Why

Chromium stops letting a page cancel touchmoves after the first one it does not consume, even on an axis `touch-action` forbids (a horizontal drag under `pan-y`). Counting every uncancelable `touchmove` therefore drops every sideways swipe inside a vertically scrolling page (a carousel, a swipe row) on Android before it reaches its 10 px start. A real browser pan still reports through `pointercancel` or the scroll. The gesture host in #8071 already judges the first uncancelable move this way. Credit: @vjeux measured the Chromium behavior and proposed the rule.

## Existing authority searched

- `spec:AST-094` FR20 (current), FR18, FR2/DEC-8 (10 px scroll take distance), FR19.
- Overlap: #8978 edits FR19 and re-pads the verification table; whichever merges second rebases.

## Rejected alternatives

- Counting every uncancelable `touchmove`.

## Writing rubric results

- R1 narration: none.
- R2 research in the record: none; the Chromium measurement stays in this description.
- R3 evidence naming a change: none.
- R4 rejected alternatives over one line or outside a decision: none.
- R5 pull request or issue references remaining: none.
- R6 ruled open questions still listing options: none.

## Scope

- [x] This PR contains specification records only: one FR20 sentence and one verification row.
- [x] It records observable behavior and preserves equivalent internal implementations.
- [x] Public text contains no internal context.

## Validation

- `pnpm check:knowledge`
- Prettier
…ncel

# Conflicts:
#	docs/specs/AST-094-touch-presentations/spec.md

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approval waits on an engineering owner's decision for this head: the merge from main is a new commit, and the only /approve-spec on this pull request names an earlier one, so it no longer applies. The FR19 wording is unchanged by the merge, the record passes the knowledge check, and the new exception still fits FR20 as amended on main, so nothing else needs to change. To settle it, an engineering owner comments /approve-spec <full head SHA> to approve FR19's fourth exception and the new FR18–FR22 case as worded, or asks for different wording; the author can do this as an engineering owner.

[Automated review]

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 8ca2703

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Oct 31, 2026
@cixzhang cixzhang closed this Oct 31, 2026
@cixzhang cixzhang reopened this Oct 31, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This spec change is ready to merge: an engineering owner approved FR19's fourth exception and the new FR18–FR22 case at this head, and the record passes the knowledge check and Prettier. The earlier overlap with FR20 is resolved by excluding the browser's take from the new exception, and nothing else needs to change.

[Automated review]

@cixzhang
cixzhang merged commit 37d88c0 into main Oct 31, 2026
103 checks passed
@github-actions
github-actions Bot deleted the spec/ast094-moving-cancel branch November 1, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — 8ca2703c Deployed Oct 31, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant