Skip to content

fix(BottomSheet): a slow swipe down on the sheet's content no longer rubber-bands the content under the finger on iOS - #10033

Merged
cixzhang merged 8 commits into
mainfrom
fix/bottom-sheet-pan-cancel-slop
Nov 10, 2026
Merged

cixzhang merged 8 commits into
mainfrom
fix/bottom-sheet-pan-cancel-slop

Conversation

@imdreamrunner

@imdreamrunner imdreamrunner commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

User impact

A finger that swipes a BottomSheet down from its content, on iOS Safari, sometimes sees two things move: the sheet follows the finger, and the content inside the sheet rubber-bands under it at the same time (to about −134 px over a 320 px pull), then springs back during the exit. It happens when the swipe starts slowly: when the finger's first touchmove reaches the page before it has travelled 8 px. A swipe whose first move is 8 px or more is smooth. The sheet's grabber is never affected, only its scrolling content.

Problem and solution fit

Why does the content move: the sheet's body handler cancels the native pan (preventDefault() on touchmove) only once the pull passes DRAG_PROMOTION_SLOP (8 px). Mobile Safari commits a touch to the scroller's pan on the first touchmove the page keeps once the finger has moved about 10 px (spec:AST-094 FR2's scroll take distance), and no later preventDefault() stops a committed pan. So a first move of 4–7 px that the page keeps, followed by a move past 10 px, hands the body to the native scroll (pointercancel fires) while the sheet's own drag starts beside it.

Why does it harm the task: the content bounces against the finger while the sheet moves, so the swipe reads as janky and the dismissal as unsure.

Why does it matter: dismissing a sheet by swiping its content is the most common way to close it on a phone.

The fix cancels the native pan as soon as the pull opposes the armed edge by more than a tap's wobble (PAN_CANCEL_SLOP, 5 px), before the drag's own 8 px promotion, so no move the browser could commit on is ever kept. A real scroll (a pull away from the edge) is never cancelled.

Expected behavior and authority

spec:AST-094 FR14 (a drag that starts at a scroll edge toward that edge is the sheet's, decided once) and FR19 with DEC-18 (a scroll-edge pan may cancel its touch's moves before the pan begins, only while every scroller sits at its edge and the drag moves toward it). This change implements DEC-18. Per the specs owner's ruling, DEC-18 keeps its approved text; FR19 keeps "MAY cancel … from the first move" and adds: "A scroll-edge pan that waits out a tap's wobble before cancelling MUST still cancel before a kept move could commit the native pan (DEC-29)." A new DEC-29 (Specs consistency ruling, applying DEC-18) records the Mobile Safari 27.0 measurement and BottomSheet's 5 px wobble. Rubric results below.

Smallest restoration

One early preventDefault() in useSheetGestures's body touchmove handler, gated on the same edge test the promotion uses, plus the constant that names the threshold. No API, no visual change, no change to the promotion itself.

Evidence

Measured on the iOS 27.0 simulator (iPhone 17, Mobile Safari 27.0) with HID swipes on core-bottomsheet--tall-sheet (a Tall sheet whose list sits at its top), reading the body's scrollTop, pointercancel, and the first touchmove's travel and defaultPrevented from the page.

  • Reproduction before the change (main): 14 of 14 swipes whose first touchmove travelled 4–8 px (kept by the page) ended in pointercancel and a body scrollTop of −131 to −135 px while the sheet followed the finger; 0 of 8 swipes whose first move travelled 14–16 px did. The same swipes on v0.6.0 (body overscroll-behavior: none then) committed the pan too (6 of 6 pointercancel) but moved nothing; the bounce began when the body moved to overscroll-behavior: contain with the shared scroll area (v0.6.3), and it has been there since.
  • Result after the change: 0 of 14 swipes with a first move of 4–14 px (core-bottomsheet--tall-sheet and core-tokenizer--sheet-presentation) show pointercancel or a body scrollTop below 0; every move past 5 px is cancelled; the sheet follows the finger 1:1 (0 lag frames over 17 input frames per run) and the swipe dismisses.
  • Representative unchanged path: a grabber drag, a swipe whose first move is ≥ 14 px, and the Chromium/WebKit Playwright drag metrics (finger→sheet lag 0 px, 3–8 React commits per drag, 0.3 s exit) are unchanged.
  • Taps: a tap on a button in the sheet that wobbles 3 px still clicks (3 of 3); one that wobbles 5–8 px toward the edge loses its click (WebKit ends a touch's click when one of its touchmoves is cancelled). Before this change a tap in a sheet whose content overflows kept its click up to 8 px of wobble; a tap in a hug sheet already lost it at 5 px through the scroll lock's page hold.
  • Regression test: useSheetGestures.test.ts — a top pull of 3 px is not cancelled and does not drag; 6 px is cancelled and does not drag yet; 9 px is cancelled and drags. The mirror for a bottom pull-up at a lower detent, and an upward move from the top that is left to the scroll.

Scope

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm vitest run --project ui packages/core/src/BottomSheet/useSheetGestures.test.ts packages/core/src/BottomSheet/BottomSheet.test.tsx packages/core/src/BottomSheet/BottomSheetPanel.test.tsx
  • pnpm check:knowledge
  • iOS 27.0 simulator HID swipes as above; Playwright Chromium (4× CPU) and WebKit phone-profile drags on core-bottomsheet--tall-sheet and --snap-points (body and grabber).

Writing rubric results

  • R1 narration: none; FR19 and DEC-29 state what the pan does and why, in the present tense.
  • R2 research: none in the record; DEC-29 keeps the measurement its conclusion rests on, by engine and version; the full runs are in this pull request.
  • R3 evidence: no pull request, issue or commit named; the basis is the measured scroll take distance and WebKit's click behavior.
  • R4 rejected alternatives: none added; DEC-18 is unchanged.
  • R5 change references: none.
  • R6 open questions: none touched.

Maintainer carry (@cixzhang)

Carried forward on this branch with @imdreamrunner's commit kept, after the review:

  • Records follow the specs owner's ruling: DEC-18 is back to its approved text; FR19 keeps the shared pan's "from the first move" and adds the cause-stated bound; DEC-29 records the measurement and the 5 px wobble for BottomSheet. Core's shared scroll-edge pan keeps cancelling from the first move, so it still matches FR19; giving it the same wobble (Lab NavigationStack, RefreshControl) is a separate change with its own browser checks.
  • A sideways swipe is not cancelled early: past the wobble, the early cancel applies only while the pull moves more along the block axis than sideways, so a horizontal row's scroll in a sheet at its top is not cancelled before the sheet's drag begins at 8 px (FR19). A new case pins it and fails without the check. The 8 px promotion itself keeps main's behavior.
  • A promoted drag still cancels its move, as on main.
  • Changeset names the 5–8 px wobble toward the edge that now loses a tap's click.
  • A first move of exactly 5 px cancels. An iOS 26.2 Simulator capture showed Mobile Safari commits a kept 5 px first move to the rows' pan (4 of 5 runs bounced; 1–4, 6, 8 and 14 px were clean). The cancel now fires when the pull reaches the 5 px wobble, a new test pins the 4 px and 5 px edge (it fails with the old > check), and DEC-29 records both measurements.
  • Main merged. BottomSheet suites pass (588 tests).
  • Phone check page: a raw sandbox page, /pages/bottom-sheet-pull/, opens a sheet of 40 rows over a page that scrolls with the document, and shows the last row tapped. It is test surface only.

Tap wobble at 2719e90

The cancel fires when a first move toward the scroll edge reaches 5 px, so the tap trade-off is the one DEC-29 records:

  • A tap that wobbles less than 5 px keeps its click. Nothing is cancelled below 5 px, and a WebKit click ends only when a touchmove is cancelled. The new test pins a 4 px move as not cancelled.
  • A tap that wobbles 5 to 8 px toward the edge loses its click. This only happens while the rows sit at that edge. A wobble away from the edge, or a mostly sideways one, is never cancelled before the drag begins.
  • Why that's acceptable: at 5 px Mobile Safari has already committed the touch to the rows' pan (the iOS 26.2 capture above), so the same 5 px move either loses the click or rubber-bands the rows.
  • Measured on the iOS 26.2 Simulator at 2719e90 (Mobile Safari, 30 taps on Items 2, 5 and 9 with the rows at the top): under 5 px, nothing in the page cancels a tap. There is no cancelled touchmove or pointercancel, and the pull never starts. The sub-5 px misses (about 25% at 3–4 px) also happen on a plain button and on main's own sheet, so they come from WebKit's tap tolerance and this PR doesn't change them. At 5–6 px down, the new >= 5 cancel drops the click (0 of 6), which is the stated trade. It matches main's existing sideways rule: PAGE_HOLD_SLOP = 5 already drops 5–6 px sideways taps (0 of 6).

Phone check (iPhone, Safari)

Preview at cd50f7f (the checked head): https://astryx-cruxgx5t9-fbopensource.vercel.app/sandbox/pages/bottom-sheet-pull/

  1. Tap Open sheet. With the rows at the top, pull down slowly on a row (start with a few millimetres, then keep going): the rows do not stretch or bounce under the finger, and the sheet follows the finger down.
  2. Scroll the rows up and down, then flick down from the top: the rows scroll as before, and a fast flick still closes the sheet.
  3. Open it again and tap a few rows: each tap shows "Tapped Item N".

Main merge at cd50f7f (DEC-31 carry does not apply)

main (2309691) is merged in at cd50f7f with no force-push and @imdreamrunner's commits kept. The one conflict was apps/sandbox/scripts/next-export-routes.json, where both sides added a route; both are kept, sorted.

The spec:AST-094 DEC-31 evidence carry was checked and does not apply, so the evidence is taken again at this head:

  • Own diff: the added and removed lines of all 7 changed files are identical between 9f55320→2719e908 and 2309691→cd50f7f4. The patch-id differs because main changed the surrounding context.
  • Overlap: main changed three files this PR changes (docs/specs/AST-094-touch-presentations/spec.md, apps/sandbox/src/app/sandboxPages.ts, apps/sandbox/scripts/next-export-routes.json).
  • Imports: no direct import of useSheetGestures.ts changed, and no shared motion or layer module changed (motion/transientCopy, motion/inertClone, motion/animator, Layer/useLayer, hooks/usePager).
  • BottomSheet itself: main changed BottomSheet/BottomSheet.tsx (fix(BottomSheet): a sheet whose close is suspended takes the scrim #10776: a suspended close takes the scrim), the component that hosts these gestures, so the felt behavior is checked again.

A fresh real-iPhone check was due at this head; its result is below.

Real-device evidence at cd50f7f

  • Real iPhone, Safari, 2026-11-09, at cd50f7f, by a maintainer (@cixzhang): the three phone-check steps above all pass. A slow pull on the rows at the top doesn't rubber-band and the sheet follows the finger. Scrolling and a fast flick close behave as before. Taps, including one with a slight wiggle, activate the row.
  • Earlier evidence at 2719e90 (same product code): recordings on a hosted iPhone 14 (iOS 26.2). All three steps pass, with normal motion and with Reduce Motion. The one-frame snap-back under Reduce Motion also happens on main, so it's tracked separately.
  • Not covered by the pass: a diagonal first move of about 6×6 px over a list with no horizontal scroller is still kept, not cancelled, until the 8 px drag starts. That's a follow-up, not a defect this PR claims to fix.

Second main merge at 4ad6d46 (evidence carries under DEC-31)

main (8a67045) is merged in at 4ad6d46, with no conflicts and no force-push. It picks up #10934, which fixes an unrelated CLI render test that the first merge brought in broken. The spec:AST-094 DEC-31 carry holds for the real-iPhone check at cd50f7f:

  • Own diff: the added and removed lines of all 7 changed files are identical between main→cd50f7f4 and main→4ad6d466.
  • No overlap: none of the 27 files main changed since cd50f7f is a file this PR changes, a BottomSheet/ file, a direct import of useSheetGestures.ts (gestures/VelocityTracker, motion/resolveSnapPoint, motion/rubberBand, motion/uikit/scroll, motion/uikit/sheet, BottomSheet/snapOffsets), or a shared motion or layer module (motion/transientCopy, motion/inertClone, motion/animator, Layer/useLayer, hooks/usePager).

Commands: git diff --name-only 2309691d 8a670454 compared against those paths (no match), and a per-file comparison of the PR's added and removed lines (all identical).

…rubber-bands the content under the finger on iOS

The body's touchmove handler cancelled the native pan only once a pull passed
the 8 px promotion slop. Mobile Safari commits a touch to the scroller's pan on
the first touchmove the page keeps once the finger has moved about 10 px, and
no later preventDefault() stops a committed pan. A swipe whose first move was
4-7 px handed the content to the native scroll while the sheet's own drag began
beside it: the content rubber-banded to about -134 px over a 320 px pull, under
the moving sheet, and sprang back during the exit.

A pull that opposes the armed scroll edge now cancels its touchmove as soon as
it passes a tap's wobble (5 px), before the promotion. A real scroll is never
cancelled, and a tap that wobbles up to 5 px keeps its click. AST-094 FR19 and
DEC-18 record the take distance and the wobble allowance.
@vercel

vercel Bot commented Nov 5, 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 Nov 10, 2026 3:39am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 5, 2026
@astracat-bot

astracat-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 10, 2026, 4:51 AM UTC

@imdreamrunner

Copy link
Copy Markdown
Contributor Author

/approve-spec 0b4c2ae

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Requesting changes. The BottomSheet fix itself holds up, and its new tests fail on main and pass here, but the spec amendment now forbids what Core's shared scroll-edge pan still does.

Blocking

  • As amended here, spec:AST-094 FR19 and DEC-18 let a scroll-edge pan cancel moves only past a 5 px tap wobble, but PanGestureRecognizer.keepsTouch (packages/core/src/gestures/PanGestureRecognizer.ts) still cancels from the first move and GestureHost.test.ts asserts that a 2 px move is cancelled, so move the 5 px threshold into the shared gestures module, apply it in keepsTouch, import it in useSheetGestures.ts, and update that test and the gestures README.

Worth a look (non-blocking)

  • The early cancel reads only vertical travel, so in a sheet at its top a sideways swipe on a horizontal row is cancelled once it drifts 6–8 px down, and cancelling only while vertical travel exceeds horizontal travel would keep FR19's "never a real scroll".
  • FR19's new MUST sets the limit at the 10 px take distance although DEC-18 records that a kept 7 px first move already commits the pan, DEC-18's title still says "from the first move", and the changeset could say that a 5–8 px wobble toward the edge now loses the tap's click.

[Automated review]

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 4ad6d46

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
BottomSheet 68.3 kB (+73 B) · 7.7 kB CSS (0) — ✗ · ✓ · —
BottomSheetSwitcher 17.9 kB (0) · 3.4 kB CSS (0) — ✗ · ✓ · —
TimeInput 162.6 kB (+89 B) · 16.0 kB CSS (0) — — · — · —
22 more components
Component Size LoC Visual · A11y · RTL
DateInput 187.1 kB (+77 B) · 17.0 kB CSS (0) — — · — · —
PowerSearch 288.4 kB (+67 B) · 24.2 kB CSS (0) — — · — · —
DateTimeInput 208.8 kB (+52 B) · 18.7 kB CSS (0) — — · — · —
DropdownMenu 97.3 kB (+1 B) · 17.6 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 106.1 kB (+1 B) · 773 B CSS (0) — — · — · —
lab/CommentComposer 152.2 kB (+1 B) · 1.9 kB CSS (0) — — · — · —
lab/TourStep 97.4 kB (+1 B) · 590 B CSS (0) — — · — · —
ContextMenu 109.0 kB (0) · 17.4 kB CSS (0) — — · — · —
MoreMenu 97.5 kB (0) · 17.6 kB CSS (0) — — · — · —
MultiSelector 95.0 kB (0) · 16.8 kB CSS (0) — — · — · —
Pagination 110.3 kB (0) · 17.8 kB CSS (0) — — · — · —
Popover 91.1 kB (0) · 14.2 kB CSS (0) — — · — · —
Table 125.6 kB (0) · 18.3 kB CSS (0) — — · — · —
TableCell 110.2 kB (0) · 17.9 kB CSS (0) — — · — · —
TableHeaderCell 109.8 kB (0) · 17.7 kB CSS (0) — — · — · —
Tokenizer 91.5 kB (0) · 18.8 kB CSS (0) — — · — · —
lab/ChatReactionBar 107.3 kB (0) · 1.1 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 278.5 kB (0) · 454 B CSS (0) — — · — · —
Markdown 188.4 kB (−1 B) · 20.6 kB CSS (0) — — · — · —
Selector 100.2 kB (−1 B) · 17.4 kB CSS (0) — — · — · —
lab/Comments 352.1 kB (−1 B) · 2.5 kB CSS (0) — — · — · —
lab/CommentThread 345.2 kB (−1 B) · 2.4 kB CSS (0) — — · — · —
Visual changes: 2 snapshots in 1 component

A change is a question for the reviewer, not a failure.

Component · story Before After Diff
BottomSheet · Text Only (neutral, dark) before frame after frame diff frame
BottomSheet · Text Only (neutral, light) before frame after frame diff frame

Package size: @astryxdesign/core 7.23 MB packed (+739 B); no new dependencies.

API changes: none in this pull request

Committed API report behind this build: cli 29 rows, core 36 rows; run pnpm api:report.

Touched components checked; add ci:run-visual or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

# Conflicts:
#	docs/specs/AST-094-touch-presentations/spec.md
…s follow the Specs ruling

A pull past the tap's wobble is cancelled only while it moves more along
the block axis than sideways, so a horizontal row's scroll in a sheet at
its top stays a real scroll (FR19). A promoted drag still cancels its
move. DEC-18 keeps its approved text; FR19 keeps 'from the first move'
and adds the cause-stated bound, and DEC-29 records the Mobile Safari
measurement and the 5 px wobble. The changeset names the 5 to 8 px
wobble that now loses a tap's click.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 9, 2026
@cixzhang

cixzhang commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 6bfdc56

@cixzhang cixzhang added ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) labels Nov 9, 2026
@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 9, 2026
A raw page that scrolls with the document opens a BottomSheet of 40
rows that scroll inside it, and reports the last row tapped, so a slow
pull on the rows and a tap can be checked on a real device.
@cixzhang

cixzhang commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

/approve-spec bac97c1

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Requesting changes. The early cancel itself holds up: both new cancel tests fail against main's handler and pass here, every BottomSheet suite passes, and the FR19 and DEC-29 amendment is owner-approved for this head.

Blocking

  • The changeset (and the handler comment at useSheetGestures.ts:1751-1752) says a mostly sideways swipe on a horizontal row is never cancelled, but the 8 px promotion at useSheetGestures.ts:1768 has no axis test, so a first move of 30 px sideways and 9 px down is still cancelled and becomes a sheet drag, as on main: narrow the wording (for example "a mostly sideways swipe is not cancelled before the sheet's drag begins at 8 px") or give the promotion the same vertical-dominance test, with a 30/9 test case and its own phone check.

Worth a look (non-blocking)

  • A diagonal first move that is at least as sideways as vertical is kept even over a list with no horizontal scroller (8 px sideways and 7 px down is kept), so by DEC-29's 7 px measurement it may still let Safari commit the pan; consider skipping the cancel only when an inline-axis scroller sits under the finger.

CI has not run on this head yet because the pull request is a draft.

[Automated review]

if (
(opposesTop || opposesBottom) &&
Math.abs(delta) > PAN_CANCEL_SLOP &&
Math.abs(delta) > Math.abs(t.clientX - armed.startX) &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Non-blocking: this exempts any move at least as sideways as vertical, even when no horizontal scroller sits under the finger (scrollChainUnder collects block scrollers only). A first move of 8 px sideways and 7 px down is kept, and DEC-29 records that a kept 7 px move commits the pan, so a diagonal start over a plain list may still bounce. Skipping the cancel only when an inline-axis scroller is under the finger would close that; a diagonal swipe on the simulator would show whether it matters.

@cixzhang
cixzhang marked this pull request as ready for review November 9, 2026 08:48
@cixzhang
cixzhang marked this pull request as draft November 9, 2026 08:49
…ag begins

The early cancel skips a mostly sideways move, but the 8 px promotion
keeps main's behavior and has no axis test. The changeset and the
handler comment now say the exemption holds before the drag begins.
@cixzhang
cixzhang marked this pull request as ready for review November 9, 2026 08:59

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI is still running on this head, and every check that has finished so far passes.

The early cancel holds up, and the changeset now limits the sideways exemption to before the sheet's drag begins at 8 px, which matches the code. Both new cancel tests fail against main's handler and pass here, every BottomSheet suite passes, and the FR19 and DEC-29 amendment is owner-approved for this head.

Worth a look (non-blocking)

  • A first move at least as sideways as vertical is kept even over a list with no horizontal scroller (8 px sideways and 7 px down is kept), so by DEC-29's 7 px measurement a diagonal slow start may still let Safari commit the pan; skipping the cancel only when an inline-axis scroller sits under the finger would close it.
  • Miss: the changeset's cause, "the first touchmove a page keeps committed the touch", is broader than this pull request's own evidence, where kept first moves of 3–5 px do not commit; "a kept touchmove of about 7 px" matches DEC-29.

[Automated review]

Comment on lines +1749 to +1751
// edge. Its native pan is cancelled before the promotion slop, once the
// pull passes a tap's wobble, because a later cancel no longer stops a
// pan iOS Safari has committed. Before the sheet's drag begins, a mostly

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Non-blocking (INV29 style): this sentence runs to 29 words and is passive. Suggested: "A pull toward the armed edge cannot scroll, because the chain is at that edge. Cancel its native pan once the pull passes a tap's wobble. iOS Safari commits the pan on a kept move, and a later cancel does not stop it."

@cixzhang

cixzhang commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 30437e1

@cixzhang
cixzhang marked this pull request as ready for review November 9, 2026 09:46

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI is still running on this head, and no check has failed so far.

Starting the early cancel at 5 px rather than past it matches the iOS 26.2 measurement DEC-29 now records, and the new exact-wobble test fails against the previous revision and main and passes here. All 14 BottomSheet unit-test files pass, and the FR19 and DEC-29 amendment is owner-approved for this head.

Worth a look (non-blocking)

  • A first move at least as sideways as vertical is still kept up to 8 px, even over a list with no horizontal scroller (5 px sideways and 5 px down is kept), so by DEC-29's 5 px measurement a slow diagonal start may still let Safari commit the pan; skipping the cancel only when an inline-axis scroller sits under the finger would close it.
  • The changeset's "a first move past 8 px starts the drag in any direction" overstates, because a first move of 30 px sideways and 2 px down starts nothing; "once the pull toward the edge passes 8 px, the drag starts however sideways the move is" matches the code.
  • DEC-29's "the author's earlier Mobile Safari 27.0 run" is project history in a record, where "Mobile Safari 27.0 on the simulator commits at 7 px" states the fact; the description's rubric results and Evidence section still describe the earlier DEC-29.

[Automated review]

'@astryxdesign/core': patch
---

[fix] BottomSheet: a finger's pull on the sheet's content at a scroll edge cancels the content's native pan as soon as the pull reaches a tap's wobble (5 px), before the sheet's own drag begins at 8 px. In iOS Safari the first `touchmove` a page keeps committed the touch to the content's scroll, so a slow-starting swipe down rubber-banded the content under the finger while the sheet moved beside it. A tap that wobbles less than 5 px keeps its click, while a tap that wobbles 5 to 8 px toward the edge now loses it. A real scroll is never cancelled. A mostly sideways swipe on a horizontal row is not cancelled before the sheet's drag begins; a first move past 8 px starts the drag in any direction, as before.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Non-blocking: "a first move past 8 px starts the drag in any direction, as before" reads as if any 8 px move starts the sheet's drag, but a first move of 30 px sideways and 2 px down, or 9 px up from the top, starts nothing: the promotion needs 8 px of pull toward the edge (useSheetGestures.ts:1770-1771). Suggested: "A mostly sideways swipe on a horizontal row is not cancelled before the sheet's drag begins; once the pull toward the edge passes 8 px, the drag starts however sideways the move is, as before." The handler comment at useSheetGestures.ts:1754 says the same.

Comment on lines +1495 to +1497
Mobile Safari commits a kept first move of 5 px to the native pan (iOS 26.2
Simulator; a kept move of 4 px commits nothing; the author's earlier Mobile
Safari 27.0 run committed at 7 px), so BottomSheet cancels from a first move

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Non-blocking: "the author's earlier Mobile Safari 27.0 run committed at 7 px" says who ran what, which the writing rubric (R1) keeps out of a record. Suggested: "(iOS 26.2 simulator; a kept move of 4 px commits nothing; Mobile Safari 27.0 on the simulator commits at 7 px)". The description's rubric results and Evidence section still describe the earlier 27.0-only DEC-29.

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 2719e90

# Conflicts:
#	apps/sandbox/scripts/next-export-routes.json
@cixzhang
cixzhang marked this pull request as draft November 10, 2026 02:06
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 10, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

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 approving the spec:AST-094 record changes at this head. FR19's new sentence and DEC-29 are the text approved earlier, but the merge of main left no approval on this head. An engineering owner, the author included, records the decision by commenting /approve-spec <full head SHA> on this pull request. The BottomSheet change itself holds up: the new cancel tests fail against main's handler and pass here, and all 14 BottomSheet unit-test files pass.

Worth a look (non-blocking)

  • The real-iPhone pass that the description lists as due at this head is still needed: the earlier simulator runs behind DEC-29's 5 px commit point do not carry across this merge, because it changed files this pull request changes.
  • A first move at least as sideways as vertical is still kept up to 8 px, even over a list with no horizontal scroller (5 px sideways and 5 px down, for example), so a slow diagonal start may still let Safari commit the pan.
  • The earlier wording notes are still open: the changeset's "the first touchmove a page keeps" and "in any direction", DEC-29's "the author's earlier … run", and the handler comment's 29-word sentence.

[Automated review]

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec cd50f7f

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 10, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: one piece of required evidence is missing at this head. The spec:AST-094 record changes are approved for this head, and the BottomSheet change itself holds up: the new cancel tests fail against main's handler and pass here, and all 14 BottomSheet test files pass.

Blocking

  • Regression: the merge of main changed three files this pull request changes, so under spec:AST-094 DEC-31 the earlier device runs no longer count, and the real-device evidence that AST-094's Platform support and DEC-27 require for its iOS Safari claims (the rubber-band fix and DEC-29's 5 px commit point) is missing; run the description's phone check on a real iPhone against this head and record the results in the description.

Worth a look (non-blocking)

  • A first move at least as sideways as vertical (6 px by 6 px, say) is still kept up to 8 px over a list with no horizontal scroller, so a slow diagonal start may still let Safari commit the pan; the real-device pass can include one.
  • The earlier wording notes are still open: the changeset's "the first touchmove a page keeps" and "in any direction", DEC-29's "the author's earlier … run", and the handler comment's 29-word sentence.

CI has not run on this head yet because the pull request is a draft.

[Automated review]

@cixzhang
cixzhang marked this pull request as ready for review November 10, 2026 03:12

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI is still running on this head, and no check has failed so far.

The early cancel holds up: the new cancel tests fail against main's handler and pass here, all 14 BottomSheet test files pass, the spec:AST-094 FR19 sentence and DEC-29 are approved for this head, and the real-iPhone pass recorded in the description covers the iOS Safari claims.

Worth a look (non-blocking)

  • A first move at least as sideways as vertical (6 px by 6 px, say) over a list with no horizontal scroller is still kept until 8 px, which the description already lists as a follow-up.
  • The changeset's "the first touchmove a page keeps" and "in any direction", the handler comment's 29-word sentence, and DEC-29's "the author's earlier … run" still read broader or more historical than the code and the record need.

[Automated review]

github-actions Bot added a commit that referenced this pull request Nov 10, 2026
@cixzhang
cixzhang marked this pull request as draft November 10, 2026 03:32
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 4ad6d46

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved. CI has run on this head and passes.

The early cancel holds up: the new cancel tests fail against main's handler and pass here, the spec:AST-094 FR19 sentence and DEC-29 are approved for this head, and the real-iPhone check recorded in the description still applies, because the latest merge of main touched none of this change's files or imports.

Worth a look (non-blocking)

  • A first move at least as sideways as vertical (6 px by 6 px, say) over a list with no horizontal scroller is still kept until 8 px, which the description already lists as a follow-up.
  • The changeset's "the first touchmove a page keeps" and "in any direction", the handler comment's 29-word sentence, and DEC-29's "the author's earlier … run" still read broader or more historical than the code and the record need.

[Automated review]

@cixzhang
cixzhang marked this pull request as ready for review November 10, 2026 04:24
github-actions Bot added a commit that referenced this pull request Nov 10, 2026
@cixzhang
cixzhang merged commit 7e1aab3 into main Nov 10, 2026
133 checks passed
@cixzhang

Copy link
Copy Markdown
Contributor

(Posted by Cindy's agent.) Merged. Thank you, @imdreamrunner! On iOS, a slow pull on a BottomSheet no longer makes its content rubber-band. Our team added a few follow-up commits on your branch, checked it on a real iPhone, and kept your authorship.

@github-actions
github-actions Bot deleted the fix/bottom-sheet-pan-cancel-slop branch November 11, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — 4ad6d466 Deployed Nov 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) 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.

2 participants