An open source design system that's fully customizable and agent ready
TypeScript
spec(AST-094): only a finger's first uncancelable move can hand it to the browser (FR20) (#8456)
Cindy Zhangbb46e3662734
diff --git a/docs/specs/AST-094-touch-presentations/spec.md b/docs/specs/AST-094-touch-presentations/spec.mdindex 41244a1b58..24568cd9f9 100644--- a/docs/specs/AST-094-touch-presentations/spec.md+++ b/docs/specs/AST-094-touch-presentations/spec.md@@ -310,12 +310,18 @@ a measured, sourced difference exists.That is never worse than UIKit, whose scrolling stops on a busy main thread,and a passive listener, or one added at `touchstart`, would hand diagonaldrags to the scroll.-- **FR20 — The browser can take a touch.** `pointercancel`, an uncancelable- `touchmove`, or a native scroll under the touch MUST count as the browser- taking the touch, a native scroll only once that finger has moved the scroll- take distance (FR2), so sub-pixel movement under a still finger does not- cancel a tap (DEC-8): possible recognizers that share it fail, active ones are- cancelled, and the view's press is cancelled without a release. A recognizer that never claims (a watcher) registers only passive+- **FR20 — The browser can take a touch.** `pointercancel`, a finger's first+ uncancelable `touchmove`, or a native scroll under the touch MUST count as+ the browser taking the touch, the `touchmove` only when the browser could+ scroll along the finger's main axis, and a native scroll only once that+ finger has moved the scroll take distance (FR2), so sub-pixel movement under+ a still finger does not cancel a tap (DEC-8): possible recognizers that share+ it fail, active ones are cancelled, and the view's press is cancelled without+ a release. 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. A recognizer that never claims (a watcher) registers only passivelisteners (`architecture:react-component-runtime` INV3, INV5), and awatcher is not cancelled when the browser takes the touch: it follows thescroll to the lift (DEC-7).@@ -648,6 +654,7 @@ under a finger, and a mouse follows `module:DropdownMenu/useMenuPress` FR3 and| FR14 | Browser tests of a sheet over a scrolled list | scrolled and at its top | a midway handoff fails || FR15–FR17 | Recognizer unit tests on synthetic streams with explicit timestamps | exclusive, simultaneous, require-to-fail, nested; a watcher beside a claiming winner; a blocked main thread; a pan at 10 pt per axis | a wrong winner, a late deadline, or a translation that keeps the hysteresis, or a watcher failed or cancelled by a claiming winner fails || FR18–FR22 | Browser tests with real touch input (`spec:AST-013` FR10) | per-axis pans beside native scrolling, page zoom, cancelled touches, clicks after taps, keyboard activation, a modal scroll lock, a control that keeps its press through a drag; a still finger with sub-pixel jitter over a scroll view; a finger moved 9 px and 10 px straight, and (7, 7) and (8, 8) diagonally; a recognizer on an element whose author `touch-action` is narrower, including one without `pinch-zoom`; a screen-edge pan landing at 40 px and at 41 px from the edge, at 14 px and 15 px of travel, and a horizontal scroll that starts outside the band; a screen-edge pan on an element within the band, and on one that reaches beyond it; a sheet's pull from a list at its top, and from a list scrolled away from its top | a ghost click, a scroll or zoom blocked other than by the author's `touch-action`, or a cancelled unowned touchmove outside FR19's three exceptions, a tap cancelled by sub-pixel movement or by under 10 px of travel, a scroll that does not take the touch at 10 px, or a derived `touch-action` wider than the author's, a screen-edge pan that claims outside its band or before 15 px on an element within the band, or has not claimed at 15 px, or an author scroll outside the band that is blocked, a band claim of `pan-x` on an element that reaches beyond the band, or a 15 px start there, or a scroll-edge pan that cancels a move a scroller could scroll, or begins before 10 pt, fails |+| FR20 | Browser tests with real touch input in Chromium phone emulation (`spec:AST-013` FR10) | a horizontal drag under `pan-y`; a vertical drag under `pan-y` over a scroller with room; a vertical drag where no scroller has room | a horizontal drag under `pan-y` counted as the browser taking the touch, a vertical one over a scroller with room not counted, or a later uncancelable move counted, fails || FR23 | Haptics tests on the recorded moments | tap, drag, lift | a haptic outside a native moment fails || FR24 | Resource tests counting listeners, observers and timers | fine primary pointer; coarse pointer enabled and disabled; many instances; unmount | a gesture listener in a component that uses no gesture, an idle document listener outside a press other than the one shared press controller and the one stray-click swallower, a second press controller, a per-instance `document` or `window` listener, or a leak fails || FR25 | Component tests of each moved default and its `presentation` value | default; `presentation` set to the released surface | a moved default that `presentation` does not restore, or a public threshold, fails |