Skip to content

fix(DropdownMenu): a finger's touch outside only closes the menu - #12216

Draft
vjeux wants to merge 197 commits into
meta:mainfrom
vjeux:menu-outside-tap-swallow
Draft

vjeux wants to merge 197 commits into
meta:mainfrom
vjeux:menu-outside-tap-swallow

Conversation

@vjeux

@vjeux vjeux commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Base: main. #12179 is merged, and this change sits on it.

User impact

Under a finger or a pen, a tap outside an open DropdownMenu also pressed the control beneath. A native iOS menu only closes. Under real touch input in Chromium and WebKit, a Switch beneath toggled.

Problem and solution fit

The menu is a popover="auto" layer. Under a finger, the browser's light dismiss closed it, and nothing held the touch.

While its menu is open under the touch presentation, DropdownMenu now takes the layer runtime's input hold with a new 'outside' scope. That hold hears a finger's or pen's touch outside the menu first, through the shared input stream, and stops each of its events.

A tap closes the menu at its lift, and a pan as it begins. The hold cancels the held pointerdown and a tap's touchend, so no compatibility mouse event or click follows. It never cancels a touchstart or a touchmove, and touch-action is unchanged. So the page keeps its scroll and the pinch's zoom. The hold ends with that gesture and its click window.

Expected behavior and authority

spec:AST-094 FR32: under a finger, an open anchored menu closes as a touch outside it begins to pan. It also closes at the lift of a tap or hold. This pull request adds the owners' sentence: "A tap outside closes the menu and reaches nothing beneath it, under a finger or pen." Its rationale follows: "The dismissing touch, like UIKit's, reaches nothing beneath; native scrolling continues." Native reference: Testing, step 6.

Smallest restoration

DropdownMenu takes the scope as its layer shows in the touch modes, and releases it as the layer hides. The newest menu's scope decides, so a menu in an open menu's header leaves the outer menu held when it closes. A mouse keeps the layer's light dismiss and its click. presentation="popover" keeps the released behavior (FR25). A JS pan handler beneath, such as a swipe row, misses that one dismissing pan.

Evidence

  • Reproduction before the change: Testing, step 1.
  • Result after the change: Testing, step 2.
  • Representative unchanged path: every layer's interaction suite (Testing, step 3).
  • Regression test or other mutation-sensitive proof: 16 of the two test files' 65 unit cases fail without the change.

Scope

Components: DropdownMenu and its story, and the layer runtime's input hold (holdInput)

  • 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

At fedd051. Its own commit 58de566 sits on #12179's 4a5172d. 8982668 merges #12179's stacked head d94f17e. Git conflicts in DropdownMenu's imports, where both sides stay, and in FR21, where #8080's grow and this change end both gaps. 31f94f2 then updates #8080's DropdownMenuTouchGrow.test.tsx, whose stub of holdInput read until from every hold. It leaves the menu's 'outside' scope out of the stub's hold count. Without it, 5 of that file's 16 cases fail at 8982668. Then 0bad538 ends an outside tap whose target left the page, and 9596e56 moves the pan test into Layer/outsidePress.ts. Next, ea898e4 corrects DropdownMenu's record, and ede7f12 merges #12179's head 8186977, which brings main be7f821. Last, ddf9cdd makes a later finger a new touch once the browser takes an outside pan. Then 962e51f merges #12179's stacked head 7695cc7, which brings main 9e83b70 with #9777's squash and #12619. That merge changes none of this pull request's 13 files. It changes DropdownMenu/lazyMenuBottomSheet.ts (#12619), which DropdownMenu.tsx imports, and Switch/Switch.tsx, which the story imports. It also changes the comments of utils/focusOutline.stylex.ts. So the device runs at ddf9cdd do not carry (spec:AST-094 DEC-31), and steps 5 and 6 ran again at 962e51f. Then 7057b76 merges #12179's stacked head 86bd90b, which brings main cda6ca7 with #12644. That merge changes none of this pull request's 13 files. It changes hooks/useTypeahead.ts, which DropdownMenu.tsx imports. So the runs at 962e51f do not carry to 7057b76. Then 0f74470 merges #12179's stacked head cc8b488, which brings main 230045a. Git merges four files edited here with no conflict: DropdownMenu.tsx and three records. That merge also changes the shared gestures/GestureHost.ts. So they do not carry to 0f74470. Then 56e3a2d merges #12179's stacked head f396896, which brings main c1c5cdf. Git merges the story file and one record with no conflict. It also changes the shared Layer/useLayer.tsx. So they do not carry to 56e3a2d either, and steps 5 and 6 ran again there. Then dfa63db merges #12179's stacked head 5fd736a, which brings main 4493a3c. Git merges DropdownMenu.tsx and one record with no conflict, and this change's own lines are unchanged. It also changes Popover/usePopover.tsx, utils/focusReturn.ts and utils/nodeType.ts, which the files here import. So steps 5 and 6 carry to dfa63db only through a side-by-side of the two heads. Then 7f1fce5 merges #12179's head 49fc0a1, its click guard fix. That merge changes none of this pull request's 13 files. It changes utils/clickGuard.ts and hooks/useMenuPress.ts, which the files here import. Then f018190 merges #12179's head 6aeaf3c, which brings #8080's input-shield fix 4651f21. Git conflicts in one file edited here, DropdownMenuTouchGrow.test.tsx: both sides change its input-hold mock. The merge keeps both changes, and this change's own lines are otherwise unchanged. Then 1dd80db merges #12179's head 00b99cf, which moves its trust read into utils/clickGuard.ts. That merge changes none of this pull request's 13 files. Then fedd051 merges #12179's head 414ea36, which registers its trust read under a shared key. That merge changes none of this pull request's 13 files. Step 8 runs at fedd051 itself. Each browser run serves a Storybook built at the code under test; its astryx-build-sha.txt names that commit.

  1. Red first at efa036b: this commit's test files and story on 4a5172d, without the change.

    • jsdom, with pointer, touch and mouse events modeled. DropdownMenuOutsideTap.test.tsx fails 10 of 14. It fails for a finger's tap, an uncancelable touchstart, WebKit's late click that names the mouse, a pen, a pan and a pinch. It also fails for the next tap, a controlled menu, and a tap after a header menu closes. inputHold.test.tsx fails its 6 new outside-scope cases.
    • The scrim case, at 3fde36c: this head's test file on 31f94f2. An app's scrim that shows only while the menu is open takes a tap, then leaves with the menu.
    • That tap's touchend reaches no listener on the window. A tap on the page 2 s later is swallowed: its touchend is canceled.
    • The second-finger case, at a3b28d6: this head's test file on ede7f12. After the browser takes a pan outside, a second finger's touchend is canceled. The control beneath hears only its pointerdown and pointerup.
    • Real touch input: Chromium's touch through its DevTools protocol, and WebKit's tap path in WebKit's CI container. __tests__/DropdownMenuOutsideTap.interaction.browser.spec.ts fails 2 of 3 in each engine. After a tap outside, the control beneath logs pointerdown, touchstart, pointerup, touchend, mousedown, mouseup and click. After a pan outside, the menu stays open.
  2. With the change, at ddf9cdd: DropdownMenuOutsideTap.test.tsx passes 16 of 16 and inputHold.test.tsx 51 of 51 in jsdom. The browser spec passes 3 of 3 in each engine. In Chromium, whose touches scroll natively, the pan also scrolls the page.

  3. Unchanged paths, at ea898e4: the interaction specs of DropdownMenu, the hooks, Layer, Popover, Dialog, Drawer, BottomSheet, MobileNav, AlertDialog and ContextMenu pass. Chromium runs 268 pass and 10 skip; WebKit's container at one worker runs 208 pass and 70 skip. DropdownMenu's, ContextMenu's, Selector's, the hooks' and Layer's accessibility specs pass in Chromium (385). The layer runtime's LayerPanLightDismiss spec now expects a DropdownMenu tap outside to make no click. It runs its two DropdownMenu pan cases as tests. At ddf9cdd, DropdownMenu's and Layer's interaction specs pass again: 144 pass and 7 skip in Chromium, and 109 pass and 42 skip in WebKit's container.

  4. Boundaries: the trigger, the menu's layer and a live input shield count as inside. A second finger that lands anywhere while a held press's pointer is down joins the held gesture. Once the browser takes the pan, a later finger is a new touch (spec:AST-094 FR28, FR44). A press whose touch ended unheard, because its target left the page, ends at the next touch. A press elsewhere in the menu's own closed shadow root counts as inside.

  5. Android emulator (test), Chromium 160, at 56e3a2d against main c1c5cdf. Both are static builds of those commits. Before every take, the host read the build's version.json.

    • Each take adds the browser spec's control beneath to the Submenu story. It logs every pointer, touch, mouse and click event that reaches it. adb drives the touch.
    • A tap outside closes the menu, and the control hears nothing. This passes 3 of 3 at normal speed, 2 of 2 at a 4× CPU slowdown and 2 of 2 under reduced motion.
    • A pan outside closes the menu, the control hears nothing, and the page scrolls. This passes in the same three profiles, 3, 2 and 2 takes.
    • The pan closes the menu 181 to 191 ms in, and the page scrolls 51 to 61 px. At the 4× slowdown, it closes at 334 and 337 ms and scrolls 29 px.
    • On main, the tap closes the menu, but it reaches the control with all seven of its events, its click included, 3 of 3.
    • On main, the pan leaves the menu open while the page scrolls 60 px, 3 of 3. The control hears pointerdown, touchstart and touchend.
  6. iPhone 14 (test), iOS 26.2, at 56e3a2d, on the OutsideTapReachesNothing story. The phone read the build's version.json before the takes. Main has no such story, so these takes have no main comparison.

    • Reduce Motion read as off before the takes, and no step changed it.
    • In a Safari tab, a tap outside over the Switch closes the menu, and the Switch does not act, 2 of 2. The same holds over the Slider's track.
    • A vertical pan on the list closes the menu and scrolls the list 142 and 136 px in the same gesture, 2 of 2.
    • From the Home Screen, in 1 take each, the taps and the pan give the same results. A tap on the swipe row closes the menu, and the row does not act.
    • A horizontal swipe across that row closes the menu, and the row does not act, 2 of 2.
    • Controls, with no menu open: the same Switch tap acts, and the same swipe commits the row's action.
    • The swipe row ran from the Home Screen only. The phone's screen stream ran at 39.1 to 41.6 fps. All 14 takes give the expected result.
    • A desktop mouse, in headless Chromium at 1280×800, closes the menu with a click outside, and the click reaches the control. The Switch and the Slider act, 4 of 4.
  7. Native reference (test), an iPhone Simulator with iOS 26.2. A tap outside an open menu closed it and reached nothing, in 4 of 4 trials. Two were pull-down menus in Files, and two were context menus on photos. A drag outside the Files pull-down dismissed it, and the content beneath moved with the drag.

  8. At fedd051 (test), on the same iPhone 14, the step 6 takes give the expected result again, 14 of 14, Home Screen takes included. The desktop mouse check passes 3 of 3.

    • An arm64 Android virtual device with Chromium 160 ran step 5's cell on the Submenu story: a tap and a pan outside.
    • Together they pass 6 of 6, 3 each, at normal speed, at a 4× CPU slowdown and under reduced motion. On main 4493a3c, the cell fails at normal speed, 0 of 6.

Local gates: at 56e3a2d, the ui project (26,820, at 16 workers), the core type check, pnpm check:knowledge and pnpm check:repo pass. ESLint and Prettier pass on the changed files, with main's lint config. At 0f74470, DropdownMenu's, the hooks', Layer's and Popover's interaction specs pass in Chromium (200 pass, 9 skip) and in WebKit's container (155 pass, 54 skip). Strict ESLint and Prettier pass at ea898e4, and again at ddf9cdd on its two files. At ddf9cdd, pnpm review:pre passes over the own change. This pull request changes no file under packages/cli.

At the live head (test), 15d7c2d merges main 47e8505. That merge brings in 6 main commits: #13728, #13732, #13705, #11445, #13747 and #13724. Against 28c87b9, its code changes only by that main merge.
It has no conflicts, and its DropdownMenu record is byte-identical to 28c87b9's.
Main changes code its menus run: Icon/index.ts, which DropdownMenu.tsx imports. So the device rows ran again at this head (spec:AST-094 DEC-31), side by side with 28c87b9 (test).

  • No counted cell differs between the two heads, and none fails.
  • Pixel 8 taps and pans outside the menu pass 18 of 18 on each head (test). They ran at normal speed, at a 4× CPU slowdown and under reduced motion.
  • A real iPhone 14 passes 14 of 14 takes on each head, in a Safari tab and in a Home Screen web app (test). One take could not run in the Safari tab at either head, because the test driver found no target. It ran in the Home Screen web app instead, and passes there on each head (test).
  • The menu opens as a menu, not a sheet, in 15 of 15 checks on each head (test).
  • The Pixel takes and the iPhone's Safari and Home Screen takes are filmed.
  • The emulator and desktop mouse cells are still running.

28c87b9 merges main d63c249. That merge brings in 4 main commits: #13722, #11776, #13726 and #13721. Against 000d16b, its code changes only by that main merge.
It has no conflicts, and its DropdownMenu record is byte-identical to 000d16b's.
Device evidence: the full DEC-31 set at 000d16b vs 0bcb9df carries to 28c87b9, with no difference and its tap, pan and iPhone takes filmed. Main's four merged commits change none of its dependencies.

000d16b merges main 2bfebe7. That merge brings in 20 main commits, among them #13690, #13687, #13685, #13714 and #11916. Against 0bcb9df, its code changes only by that main merge.
It has no conflicts, and its DropdownMenu record is byte-identical to 0bcb9df's.
Main changes code its menus run, so the device rows do not carry (spec:AST-094 DEC-31). One full set ran again at 000d16b, side by side with 0bcb9df (test).

  • No cell differs between the two heads. Every tap, pan and iPhone take is filmed.
  • Between them, two Pixel 8 phones and an Android emulator ran at normal speed, at a 4× CPU slowdown and under reduced motion. Their taps and pans outside the menu pass 36 of 36 on each head (test).
  • A real iPhone 14 passes 14 of 14 on each head: 7 in a Safari tab and 7 in a Home Screen web app (test).
  • The menu opens as a menu, not a sheet, in 15 of 15 checks on each head. A desktop mouse passes 6 of 6 on each head (test).
  • A separate filmed no-sheet check at 28c87b9, on a fresh Pixel 8, passed 5 of 6 takes there and 5 of 5 at 0bcb9df (test). Its first take at 28c87b9, the first after deploy on a fresh Chrome, did not open the menu. That take's film was made but not saved: the tool's failure path exited before saving it, and that is now fixed. It did not reproduce in 10 filmed cold starts per build on a slow 3G link (test). In the browser tests, a tap before load opens the menu once at both builds (test). It is recorded as unexplained.
  • The emulator rows ran again on a quiet machine. In the first run, a heavy job on the same machine slowed the pans at the 4× slowdown. Under that load, those pans closed after the lift in 5 of 6 takes at 000d16b (test). At 0bcb9df it was 0 of 3, and 2 of 3 at a9e8913. None of the first run's emulator takes are counted. On the quiet machine, all three builds pass that row 3 of 3 (test).

0bcb9df merges main 68c2907. That merge brings in 37 main commits, among them #11827, #11416 and #11831. Against 48cc3c6, its code changes only by that main merge.
Its one conflict is in the DropdownMenu record's verification map. It keeps main's rows, and its FR21 row is re-padded to fit main's table.
The record keeps main's text with this change's approved edits.

  • Added: the two outside-tap test paths, and the FR21 test evidence.
  • Removed: the pan-dismissal gap, from End-user impact, Compatibility/readiness, the FR21 requirement, the FR21 evidence and Current-state impact.

48cc3c6 merges main dd706d0, where #12179 is merged. Its code differs from b15341f's only by that main merge, and its record is byte-identical.

b15341f has 647071c's tree. An empty commit on 647071c re-triggered the preview. b15341f then merges #12179's empty commit 46a28a5, so #12179's head stays below it.
647071c merges main 1e550d4 into a9e8913. Its own change is a9e8913's. Only its FR21 row in the DropdownMenu record's verification map is re-padded, to fit main's table.
There, main adds a Switch change under the iPhone outside-tap rows and the desktop mouse row. The other rows carry (spec:AST-094 DEC-31).
Those rows ran again at 3a27f09, with that tree, side by side with a9e8913 (test). The record is https://github.com/vjeux/astryx/blob/7130ae65604d79618e8c4a25d788da0896a3d60a/index.md. Both heads gave the same result on every take.

  • A real iPhone 14 ran in Safari and in a Home Screen web app. A tap over the Switch, the Slider or the swipe row closes the menu, and none of them acts.
  • There, a pan on the list closes the menu and scrolls the list 139 to 142 px. Without a menu, a tap on the Switch acts.
  • In host Chromium with a mouse, a click on the Switch outside closes the menu. The Switch acts, and focus stays on it.

a9e8913 merges #12179's head 67dc9e9, over main c1edfa4, where #8080 and #11859 are merged.
Its own change matches fedd051's in every file but Layer/inputHold.ts and its test. Those combine this change's outside scope with #13526's wait after a release and its one verdict per press.
A finger stamped just before a menu's entrance ends is the entrance's: it is held and closes nothing. The repository owners confirmed this order.

The device runs above do not carry to it: main changes code its menus run (spec:AST-094 DEC-31). Those changes include Layer/inputHold.ts (#13436, #13526), utils/scrollView.ts (#12888), motion/animator.ts (#9763, #13138), Popover/Popover.tsx and hooks/useAttachment.ts (#13155), and utils/focusReturn.ts (#11156, #13555).
They ran again side by side with fedd051 (test). The record is https://github.com/vjeux/astryx/blob/3ce1f44223f224cd7b2d9d582d347ec5ab0e577e/index.md. Every pass rule gives the same result on both heads.

  • Real Pixel 8 phones ran the Submenu story at normal speed, at a 4× CPU slowdown and under reduced motion. A tap outside closes the menu, and the control beneath hears nothing, 3 of 3 on both heads.
  • A pan outside closes the menu during the drag, and the control hears nothing. The page scrolls 202 to 234 px, 3 of 3 on both heads.
  • A real iPhone 14 ran in Safari and in a Home Screen web app. A tap outside closes the menu, and the Switch, Slider and swipe row beneath do not act.
  • A pan on the list closes the menu and scrolls the list in the same gesture. Both heads gave the same result on every take.
  • In host Chromium with a mouse, a click on the Switch outside closes the menu. The Switch acts, and focus stays on it, on both heads.
  • One difference shows in the iPhone's Safari tab, in fix(menu press): swallow a Home Screen app's late click after a pick #12179's open-and-close row. After a tap outside, focus returns to the trigger at a9e8913, and goes to the page body at 414ea36 and at main.
  • That follows from spec:AST-094 FR32: no event of an outside press held under a finger reaches the page, its compatibility mouse events included.
  • So focus is still in the menu at the close, and spec:AST-116 FR17 and DropdownMenu FR6 return it to the trigger. Under a pointer, no focus ring paints.

At 15d7c2d (test), the strict pnpm preflight --browser reports "ready to flip". Its ui step passes 27,577 tests, and its node step passes 30,332.
The accessibility contracts that it selects pass 315 tests. Its interaction step runs the full suite: 1,969 tests pass, 52 skip and none fails.

At 28c87b9 (test), the strict pnpm preflight --browser reports "ready to flip". Its ui step passes 27,564 tests, and its node step passes 30,332.
The accessibility contracts that it selects pass 315 tests. Its interaction step runs the full suite: 1,964 tests pass, 52 skip and none fails.

At 000d16b (test), the strict pnpm preflight reports "ready to flip". Its ui step passes 27,562 tests, and its node step passes 30,326.
The accessibility contracts that pnpm preflight --browser selects pass 315 tests.
Its interaction step runs the full suite: 1,963 tests pass, 52 skip and one fails.
The failure is "under a finger › storyboard: present and dismiss", in AlertDialog.motion.interaction.browser.spec.ts:1245. It ran 226th in the suite.
After 6.0 s, its dismiss wait on line 1285 threw from curves.ts:2007. The error reads: "waitForAnimation: no animation started on the element, none running and none recorded since the last wait."
In isolation (test), it passed 88 of 88 runs. Those runs covered 000d16b, main 2bfebe7, main b0272d9 before #11916, and 0bcb9df.
They overwrote the failure's error-context file.
The failing wait follows a tap on Cancel, just after the entrance. At the 5 s deadline, the dialog was still open.
The cause is a timing gap in the test harness, not this change. It reproduces on main without this change (test).
After the storyboard holds the entrance while timers wait, the input hold ends about 11 ms after the entrance looks done (test). A tap that goes down in that gap is held.
Without a storyboard, taps 0 to 80 ms after rest closed the alert in 60 of 60 runs (test). A separate pull request, #13731, will make the harness wait for the hold.
At 0bcb9df, the same suite passed: 1,964 tests pass and 52 skip.
Earlier runs needed the CLI test fix #13634 applied locally. That fix is now on main.

#12179 merged first, on its own, as dd706d0.

Public and internal API delta

None public. No export, prop, type, default or attribute changes. Internally, holdInput (Layer/inputHold.ts) takes the new OutsideInputHoldOptions: scope: 'outside', owner, onOutside and hasPanBegun. Layer/outsidePress.ts now exports hasPanBegun, the pan test that its outside-press watch and the menu share. No entry point exports either. Storybook gains the OutsideTapReachesNothing story: a menu above a Switch, a Slider, a scrolling list and a swipe row, each with a counter.

  • Size: +1363/−62 lines in its own change (8186977..ddf9cdd), tests included. Against main, this head also carries the changes below it in the Stack line. At ea898e4, against main ffd1c8e, the whole stack gives +290 B (docs), +26,053 B (form), +20,129 B (menu) and +1,342 B (table) gzip (test). Most of it is feat(TextInput, TextArea, NumberInput): fields stay above the keyboard #9777's keyboard handling and feat(DropdownMenu): a finger's open grows the menu out of its trigger #8080's grow. The repo's pnpm size:pages ran on local builds of the own change, from d94f17e to ea898e4. It gives +807 B (menu), +637 B (table), −1 B (form) and 0 B (docs) gzip (test). Its last commit, ddf9cdd, adds 19 B minified to the menu and table pages (test). Their gzip sizes change by −5 B and −4 B.
  • Where the bytes go: Layer/inputHold.js grows by +1,814 to +1,903 B minified wherever the input hold loads (menu, table and Popover pages): the outside scope. DropdownMenu/DropdownMenu.js grows by +336 to +418 B, for arming the hold at show and releasing it at hide. Layer/outsidePress.js grows by 17 to 32 B for the shared pan test. Local builds of four bundlers, own change, first-load gzip (test):
Page Vite 8 Rolldown, inline off Rolldown, inline 64 KiB webpack 5
menu +695 B +713 B +735 B +753 B
DropdownMenu only +691 B +709 B +755 B +767 B
Popover only +625 B +618 B +642 B +617 B
table +596 B +593 B +612 B +609 B
Tooltip only +0 B +0 B +0 B +0 B
docs +0 B +0 B +0 B +0 B
form +0 B +0 B +0 B +0 B

First-load chunk counts are unchanged for every page and bundler.

Writing rubric results

The rubric ran over the lines this pull request adds or changes in spec:AST-094, component:DropdownMenu and architecture:layer-runtime.

  • R1 narration: none; each new sentence states what the system does.
  • R2 research: none.
  • R3 evidence: the new verification entries name their tests, not a change.
  • R4 rejected alternatives: none added.
  • R5 change references: none.
  • R6 open questions: none added.
  • R7 project status: DropdownMenu FR21's pan gap is removed, because the menu now closes as a pan outside begins. With feat(DropdownMenu): a finger's open grows the menu out of its trigger #8080's grow below it in the stack, FR21 records no gap.

Review only this pull request's change: vjeux/astryx@67dc9e9...a9e8913

Stack: #12179 → #12216

vjeux and others added 30 commits November 3, 2026 06:35
progressCurve, mapProgress, mapRange and presentedProgressVelocity in
motion/progress.ts, internal, one velocity unit (progress per second).
Rebuilt on main from the pull request's own change, without the open
dependency chain it no longer needs.

Co-authored-by: Cindy Zhang <[email protected]>
…ressCurve

CodeBunny on meta#9755: springProgress solved the same spring as progressCurve.
It now reads progressCurve (remaining = 1 - progress), so one implementation
remains. Same curve, same settle epsilon (0.001) and duration.
…shows at each progress

lerpPath, edgeGrowPath, each path's restartFrom and morphCurves in
motion/morphPath.ts, internal. Pure geometry over a progress curve: the
caller chooses the timing. Rebuilt on the progress module from the pull
request's own change, without the open chain it no longer needs.

Co-authored-by: Cindy Zhang <[email protected]>
# Conflicts:
#	packages/core/src/motion/README.md
… source rect

createRectMorph in motion/rectMorph.ts, internal: present along a path and
dismiss back onto a copy or the element, each continuing the other from the
rect on screen. Rebuilt on main from the pull request's own change and
ported to main's engine (createMotionAnimator).

Timing follows the owner's rule for touch motion: present and dismiss take
a motion, either a theme duration and easing (a tap, a key, the program) or
a spring (a gesture's release, from its velocity). timedProgressCurve joins
the progress helpers. architecture:react-component-runtime INV12 records the
implementation gap: the size-change glide moves onto the morph next.

Co-authored-by: Cindy Zhang <[email protected]>
Each passes its input to `useMobileKeyboard` from its own render, with
no prop and no Effect of its own. On focus the field decides where it
is: inside a keyboard target such as a Tall BottomSheet it moves
nothing; in an app's bar docked at the viewport's bottom, the bar rides
the keyboard, its bottom on the keyboard's top; in scrolling content,
its nearest scroller, the document included, scrolls it 10 px above the
keyboard in the keyboard's report. In a fixed container the app
positions itself, a scroller around the field reveals it, and with none
the browser's own reveal stays. Its first tap and focus moves into it
arrive without the browser's reveal where the module places the field,
so the page never pans there.

A scroll area does not gain the range it lacks at its end yet. Where a
field's scroll area cannot place it, the document reveals it, in the
page and in a fixed container where the document's scroll moves the
container, as in Safari while its keyboard shows; elsewhere Core scrolls
the document back. Where the document cannot scroll far enough, as at a
short page's end in Chrome, a pan of the visual viewport takes the rest
in the same frame (`panVisualViewportTo`): a probe fixed in the layout
viewport is scrolled into view, as the reveal-pan watch puts a pan back.
The watch takes Core's own pan as the new rest. Firefox for Android does
not pan for the probe. A page with nothing to scroll keeps the browser's
own reveal.

On Chrome's show, a docked bar first sets its field 4 px above the
keyboard's top at once, as the Tall sheet does, and only the rest rides,
so Chrome's own pan finds the field clear. Every viewport report now
feeds the ride's reveal-pan watch, so a pan Chrome still makes is put
back, and a pan made at one keyboard height goes back at the next.
Under Remove animations, Gboard first reports a keyboard 48 px tall,
and Chrome may then reveal the bar's field itself: it scrolls the page
behind the bar, then pans. In Chrome, the ride's watch scrolls the
document back as well, when the scroll and the pan centre the field as
Chrome's reveal does; the app's own scroll to another element stays.

On iOS, a reveal that places the field rises on the browser's smooth
scroll from the keyboard's first report, which comes as the keyboard
starts to slide, so the field rises beside it (`risesSmoothly`, which
reads Core's iOS WebKit check, `isIosWebKit`). The scroll back records
where the rise is headed, and a rise still on its way when the keyboard
changes height carries on from its target. Under Reduce Motion, in a
theme that reduces motion for everyone, and in Chrome, which checks the
field in the resize's own commit, the reveal moves at once. The rise and
the scroll back ask the motion module's new `reducesMotion`, beside
`reducedMotionFade`, which now uses it, so a theme that reduces motion
for everyone counts as the setting for both. A scroll area's reveal goes
through its own `scrollBy` with an explicit behavior where it has one,
so a smooth `scroll-behavior` on the area cannot slow an instant reveal,
as the Tall sheet's reveal already does.

When the keyboard closes, each scroller a reveal moved scrolls back to
where it was (keyboardScrollBack.ts), on the browser's smooth scroll.
Safari on iOS reports the keyboard gone about half a second after the
blur that closes it, once it is down. There the scroll back starts at
that blur, once the focus change settles on nothing that brings up a
keyboard with no finger on the screen, and slides down beside the
keyboard; the report only confirms it. A finger then can be a tap that
brings the keyboard back, so the report decides, as elsewhere and under
Reduce Motion, where the scroll lands at once. Safari applies a scripted
scroll a frame late, so a scroll set each frame jitters. A scroller the
person scrolled meanwhile keeps their scroll. A field that gains focus
during the slide stops the scroll back where the page is
(`stopKeyboardScrollBack`), and its reveal goes on from there as Core's
own scroll. A sandbox page puts three fields in the middle of a page
that scrolls the document.

Each field's `.keyboard.test.tsx` drives the keyboard module's test
double. Mobile keyboard stories on TextInput place the fields low in the
page, a TextInput in a toolbar fixed at the bottom (docked, floating
above the edge, or with its own `translate`), a last field at the end of
a short page and of a scroll area, a scroll area low on the page, a
scroll area in a floating panel and in a full-viewport panel, and a
field in a sheet of a set height.

Firefox for Android can carry the reveal's document scroll as a
visual-viewport offset, show the document where it was before the
reveal at the keyboard's hide report, and turn the offset back into a
document scroll only after it. The scroll back then waits up to a
second for the first document scroll: one that lands where Core left
the document is the browser's own, and the scroll back follows it. A
touch, a keyboard that comes back, the field's page going, or the
wait's end puts nothing back.

The reveal-pan watch's touch flag now holds through a report that comes
while a finger is on the screen. In Firefox the toolbar hides in a drag,
which changes the measured keyboard height mid-drag; the watch then took
the drag's own pan for the browser's and put it back. The input stream
now counts the fingers on the screen from touch events
(`isTouchOnScreen`), only while `touchend` and `touchcancel` are heard.
A native pan keeps a finger there, though its `pointercancel` drops the
press from `getDownPresses`, so that record cannot serve. The watch's
shared touch subscription hears those two types, and a report reads the
count.

After the show's first reveal, a keyboard report reveals nothing while a
press that started after the last reveal is down. In Firefox the toolbar
hides in a drag, and the reveal re-applied itself with small scrolls
under the person's finger. The report's height is kept, so the field
stays where the person put it, and a later report with the finger up
reveals it as before. The press that focused the field holds nothing: a
long press focuses with the finger still down, and Gboard can report a
48 px keyboard first, then its full height. The input stream also counts
the touches that start (`getTouchStartCount`), and each reveal notes
that count. The keyboard module reads the finger count through
`isFingerOnScreen`: a finger down at the keyboard's last hide counts no
more until a touch starts, since a touch whose target leaves the page
ends at a node the window never hears. The count includes a stylus,
whose drag moves the page as a finger does.

Nine unit tests cover the scroll back from the blur on iOS: it starts at
the blur and the report moves nothing more; focus that moves on to
another field or into a frame keeps the page; a finger on the screen at
the blur leaves it to the report; a person's scroll stands; Reduce
Motion waits for the report; a field focused again during the slide
stops the scroll back and rises from where the page is, or stays where a
touch stopped it with nothing left to raise; and the next close goes
back to the first place, at a blur or at a report.

Six unit tests cover the scroll back: the page's smooth scroll at the
report (nothing before it), Reduce Motion, a theme that reduces motion,
a person's scroll kept, a scroll area after Back, and a focus move to
another field. Firefox-shaped cases carry the reveal as an offset and
close the keyboard before the fold: the scroll back follows the fold, a
touch-drag control keeps the page, only the first document scroll
counts, and each way the wait ends leaves no scroll listener. Safari's
and Chrome's close sequences still decide at the report, with no wait. A
Firefox-shaped drag grows the viewport twice with the finger down and
finds no put-back; after the finger is up, a browser pan is put back.
Another drags the page with the toolbar hiding twice and finds no reveal
scroll until the finger is up. A long press focuses the field while
Gboard grows from 48 to 290 px, and the field is revealed at 290; the
next show's first reveal runs again under the same press, and a press
that starts after the reveal holds the next report until it lifts. After
the keyboard goes with no finger down, a long press that brings it back
is revealed with that press still down. Another holds a report while the
long press's finger stays down after a second finger tapped and lifted.
Another misses a touch's end, as when its target leaves the page, and
finds a browser pan put back once the keyboard has hidden and shown
again. The input stream's tests count fingers through a second finger, a
cancel and a native pan's `pointercancel`, count nothing while a touch
end could go unheard, and count the touches that start. Six cover the
rise on iOS: its smooth scroll, Reduce Motion, a theme that reduces
motion, the scroll back after a rise drawn later, a rise carried on at a
new height, and no second reveal while a scroll area's rise is drawn.
Their CSS.supports stub answers both of Safari's forms, a property and
value or a condition. Another drives a scroll area with a smooth
`scroll-behavior` and finds its own `scrollBy` called at once. Two in
the motion module cover `reducesMotion`: the setting, and a theme that
reduces motion for everyone.
…opy dismissal

CodeBunny on meta#9769: a dismissal onto a copy detached the animator, and a
handed-in one was never attached again, so its owner's writes stopped
reaching the element. Only the morph's own animator lets go now.

Co-authored-by: Cindy Zhang <[email protected]>
…er and the morph

CodeBunny on meta#9769: solveAnimatedPageScroll already played this curve and
keeps the velocity of the move it retargets. timedCurve in progress.ts is
now that one curve; the pager and the morph's timed motion call it, so a
timed present that interrupts a dismissal keeps its velocity. The INV12
note states the system only. File header and comments trimmed.

Co-authored-by: Cindy Zhang <[email protected]>
CodeBunny on meta#9769: with nothing in flight the morph handed timedCurve a
velocity of 0, which it treats as a retarget and uses to cancel the
easing's starting slope. Only a motion in flight hands its velocity on now;
tests check a present from rest and a dismissal from a settled present
against the easing itself. Header and comments shortened.

Co-authored-by: Cindy Zhang <[email protected]>
The type's doc, the example and the changeset name no rule of their own
about which input plays which timing: each play takes the timing the
adopting component's motion record names (AST-094 FR45).

Co-authored-by: Christopher Chedeau <[email protected]>
FR9's scrolling-content bullet adds the spec owners' sentence: where a
browser carries out the document's scroll by moving the visual viewport,
that offset is the reveal, not a pan. Gap 2 is met. Gaps 1, 10 and 11
say what the three fields now do. Gap 11 keeps the missing scroll range
as the fix; until a scroller gains it, Core pans the visual viewport
where the document cannot scroll far enough.

Two verification rows cover Firefox for Android (the offset equals the
computed reveal) and Chrome (no pan added after Core places the field).
Chrome's names the cases Core pans, and fails a field Core pans that
ends other than 10 CSS px above the keyboard. In Firefox for Android
the pan moves nothing where the page has no scroll range; Gap 11 names
those cases.
The device-evidence row records that a docked toolbar resting under the
keyboard while a field outside it has focus is not a failure.
BottomSheet's height doc says what such a field gets in a sheet that is
not a fully expanded Tall sheet.

FR9's scrolling-content bullet adds the close: each scroller that
revealed the field scrolls back to where it was before the reveal, and
a scroll the person made while the keyboard showed is kept. A
verification row covers a field in the middle of a page that scrolls
the document.

FR9's scrolling-content bullet adds the open: on iOS the field rises on
the browser's own smooth scroll beside the keyboard's slide, settling
within 0.15 s after the keyboard settles, and it moves in one frame
under Reduce Motion, in a theme that reduces motion for everyone, and in
other browsers. A verification row reads every drawn frame of the rise.
Gap 13 records Chrome's rise, which stays in one frame because Chrome
checks the field in the resize's own commit; Firefox for Android takes
the same path. The device-evidence row's
failure for a reveal later than the keyboard's report notes that on iOS
the rise starts in that frame and settles as FR9 states.

FR9's scrolling-content bullet adds the hold: a show's first report
always places the field, and a later report that comes while a finger
is down, after a touch has begun since the field's last placement,
moves nothing.

FR9's close adds that at the hide report, Firefox for Android can still
show the document where it was before the reveal, and turns the reveal
back into a document scroll only after that report; the scroll back
follows that scroll. A row closes the keyboard with Back in
Firefox for Android at normal speed and on a slow profile.

The input-fields family's FR13 status says the same: the three fields
meet FR13 through FR9, apart from Gap 11.

FR9's close now starts the scroll back at the blur that closes the
keyboard in Safari on iOS, beside the keyboard's slide; the report that
the keyboard has gone comes later and only confirms it. Elsewhere it
starts at that report, and under Reduce Motion, and in a theme that
reduces motion for everyone, it lands at once there. A scroller the
person scrolled keeps the person's scroll, a finger on the screen at the
blur leaves the scroll back to the report, and a field that gains focus
during the slide stops the scroll back where the page is. Safari's close
row reads every drawn frame from Done until the page rests, and adds a
tap on the field 80 ms and 150 ms after Done. The open sentence is
rewrapped, word for word.
Main renamed the engine's factory to createMotionEngine. The merge
takes that name in the test bundle and in rectMorph and its tests.
The morph's comment cited AST-094 FR45 as its only link to that
record. AST-094 now lists the file, and the comment keeps the fact
without the citation. The proof imports `test` from the a11y-spec
package, whose contexts reach no remote host, as main's lint asks.
The pager's timed settle takes its curve from motion/progress.ts, so
the hook adds that module over Carousel alone. The bundle test lists
it as pager code.
The morph's popover proofs played a copy of Popover's growth that had
drifted: it lacked the overlap rule, so an overlapping popover grew
from its left edge where Popover grows from its top. The proofs now
import popoverCollapsedState, popoverFrame and frameOf from Popover.
A new overlapping case, which the deleted copy fails, pins the growth
from the top edge.
The rect morph's timedProgressCurve played, from rest, the curve that
easedProgress already plays for Popover, SegmentedControl and the
layout glide. easedProgress moves into progress.ts and takes an
optional velocity: the Hermite carry that the pager and the morph use.
From rest its values do not change. Its velocity is a central
difference that stays inside the curve, and from rest it starts on the
curve's own slope. timedProgressCurve goes, and timedCurve maps
easedProgress onto values, keeping only its carry for no distance.
The morph's turn-around proof compared restartFrom with lines written
in the test, so a change to Popover's readState or surfaceCurves left
it green. Popover exports both for the proofs, which now replay its
own turn-around. morphPath.ts's header keeps only its tags: the
paths' own JSDoc says the rest.
The note said timedProgressCurve joins the progress helpers, which
this pull request no longer adds. It now says easedProgress moves to
them with a retargeted velocity, and timedCurve joins them.
Main's Popover touch growth, which plays on the surface and floors its
opacity curve with motion/opacityFloor.ts, meets the rect morph's move
of easedProgress into motion/progress.ts in the imports of
popoverSurfaceMotion.ts. The merge keeps both: the floor's import, and
easedProgress from progress.
Popover's surface curves now stop their opacity at 0 or a floor above
it. Past its end, a turn-around toward the source takes the popover
path's opacity below 0, where Popover's stops at 0. An opacity draws
clamped to 0 through 1, so both draw 0. The proof now compares the two
as drawn, which holds with Popover's curves before and after the
floor.
A popover's grow path read its opacity on a straight line, so before
its start and past its end it went below 0: a turn-around toward the
source read -0.025 at 1.05. An opacity below 0 draws as 0, so
opacityAt now stops at 0. The popover proofs compare opacities as
drawn, since Popover's own model still reads below 0 there.
Under a finger or a pen, a DropdownMenu or MoreMenu trigger opens its
menu as it is pressed, instead of after a 500 ms hold (spec:AST-094
FR29, FR43). Inside a scroll view it opens once the 150 ms
content-touch delay passes with no scroll, so a scroll that starts on
the trigger still scrolls. The finger that opened the menu picks a row
only after moving 10 px. presentation="popover" keeps the previous
behavior.

useMenuPress with no longPressDelayMs follows the same rules, and
longPressDelayMs: 500 keeps the previous hold.
The anchored menu's case modeled a straight line from a 22 px square on
its control. The menu now grows out of its trigger on Popover's edge
path, which the popover cases already check, so the case no longer
describes any presentation's model. The file header follows.

@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.

#12216: changes requested. The code and the record text need no change, and the record text has an engineering owner's approval at this revision; what remains is device evidence at this revision.

  • Regression: this revision's merge of main changes Button/Button.tsx, which DropdownMenu renders as its trigger, so under spec:AST-094 DEC-31 the iPhone 14 (Safari tab and Home Screen web app) and Pixel 8 results stated for earlier revisions no longer carry; please state a side-by-side on the same devices against the previous revision, or new takes, at this revision.

#12179: approved (merged into main).

Whole stack: passes, with #12179 in main and the public API unchanged; a pull request lands only when it and every pull request below it are approved.

Claims and files checked

Review mode: same-head; reason: none

  • Release note: under a finger or a pen, a touch outside an open DropdownMenu only closes it, and the control beneath gets no press, compatibility mouse event or click: verified in code and unit cases at this revision; the device results are from earlier revisions.
  • Release note: a tap closes the menu at its lift and a pan as it begins, while the page still scrolls and zooms: verified (unit cases; no touch start or move is cancelled).
  • Release note: a mouse and the pinned popover presentation keep their behavior: verified (unit cases).
  • Description: the menu takes the hold as its layer shows and releases it as it hides, and the newest menu's scope decides: verified (show and hide handlers; nested-menu cases).
  • Description: the hold cancels only the held press and a tap's touch end, never a touch start or move, and ends with its gesture and click window: verified.
  • Description: the trigger, the menu's layer, a live shield and the menu's closed shadow root count as inside; a later finger after the browser takes a pan is a new touch; a press whose target left the page ends at the next touch: verified in code and unit cases.
  • Description: this revision merges main, where the pull request below has landed, and its own code changes only by that merge: verified (none of the 13 files changed).
  • Description: the DropdownMenu record is byte-identical to the previous revision's: verified.
  • Description: the iPhone and Pixel rows ran side by side on earlier revisions: stated; they do not carry to this revision (blocking above).
  • Description: no public export, prop, type, default or attribute changes: verified.
  • Description: first-load size deltas on the reference pages and the red-first counts: stated, not rerun.
  • Files: the input hold, the outside-press module, DropdownMenu, the story, the three records, the release note and the five test files: clear apart from the device-evidence finding, with one non-blocking test note.

Automated review (maintainer link)

@vjeux
vjeux marked this pull request as draft November 24, 2026 05:32
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 24, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 0bcb9df

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 24, 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.

#12216: changes requested. The code and the record text need no change, and the record text has an engineering owner's approval at this revision; what remains is device evidence at this revision.

  • Regression: this revision's merge of main changes DropdownMenu.tsx itself and files it imports directly (hooks/useMenuPress.ts, utils/focusReturn.ts, and utils/inputStream.ts under the input hold), so under spec:AST-094 DEC-31 the iPhone 14 (Safari tab and Home Screen web app) and Pixel 8 results stated for earlier revisions no longer carry; please state the results of the side-by-side the description lists as pending (the same devices against the last passed revision), or new takes, at this revision.

#12179: approved (merged into main).

Whole stack: passes, with #12179 in main and the public API unchanged; a pull request lands only when it and every pull request below it are approved.

Claims and files checked

Review mode: same-head; reason: none

  • Release note: under a finger or a pen, a touch outside an open DropdownMenu only closes it, and the control beneath gets no press, compatibility mouse event or click: verified in code and unit cases; the device results are from earlier revisions.
  • Release note: a tap closes the menu at its lift and a pan as it begins, while the page still scrolls and zooms: verified (unit cases; no touch start or move is cancelled).
  • Release note: a mouse and the pinned popover presentation keep their behavior: verified (the scope takes only touch and pen; unit cases).
  • Description: the menu takes the hold as its layer shows and releases it as it hides, and the newest menu's scope decides: verified (show and hide handlers; nested-menu cases).
  • Description: the hold cancels only the held press and a tap's touch end, never a touch start or move, and ends with its gesture and click window: verified.
  • Description: the trigger, the menu's layer, a live shield and the menu's closed shadow root count as inside; a later finger after the browser takes a pan is a new touch; a press whose target left the page ends at the next touch: verified in code and unit cases.
  • Description: a script pan handler beneath misses the one dismissing pan: verified (its moves stop at the hold).
  • Description: no public export, prop, type, default or attribute changes: verified.
  • Description: this revision only merges main, and its one conflict, in the DropdownMenu record's verification map, keeps main's rows and re-pads the FR21 row: verified.
  • Description: the iPhone and Pixel rows ran side by side on earlier revisions and do not carry to this revision, where a new set is still pending: verified; that is the blocking item above.
  • Description: the strict preflight passes at this revision: stated, not rerun.
  • Description: first-load size deltas on the reference pages and the red-first counts: stated, not rerun.
  • Files: the input hold, the outside-press module, DropdownMenu, the story, the three records, the release note and the five test files: clear apart from the device-evidence finding, with one non-blocking test note.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 000d16b

@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.

#12216: changes requested. The code and the record text need no change, and the record text has an engineering owner's approval at this revision; what remains is device evidence at this revision, which the description says is pending.

  • Regression: the merges of main since the stated device takes change DropdownMenu.tsx itself and, at this revision, Layer/useLayer.tsx, Popover/usePopover.tsx and utils/sharedRealm.ts, which the menu and its input hold build on, so under spec:AST-094 DEC-31 the iPhone 14 (Safari tab and Home Screen web app) and Pixel 8 results stated for earlier revisions no longer carry; please state the results of the side-by-side on the same devices for this revision.
  • Not blocking: the description reports one failure in the full interaction run at this revision, the AlertDialog "under a finger › storyboard: present and dismiss" test, with its cause still open; the press it describes runs through the input hold this change rewrites, so it is worth closing before the side-by-side is stated.

#12179: approved (merged into main).

Whole stack: passes, with #12179 in main and the public API unchanged; a pull request lands only when it and every pull request below it are approved.

Claims and files checked

Review mode: same-head; reason: none

  • Release note: under a finger or a pen, a touch outside an open DropdownMenu only closes it, and the control beneath gets no press, compatibility mouse event or click: verified in code and unit cases; the device results are from earlier revisions.
  • Release note: a tap closes the menu at its lift and a pan as it begins, while the page still scrolls and zooms: verified (unit cases; no touch start or move is cancelled).
  • Release note: a mouse and the pinned popover presentation keep their behavior: verified (the scope takes only touch and pen; unit cases).
  • Description: the menu takes the hold as its layer shows and releases it as it hides, and the newest menu's scope decides: verified (show and hide handlers; nested-menu cases).
  • Description: the hold cancels only the held press and a tap's touch end, never a touch start or move, and ends with its gesture and click window: verified.
  • Description: the trigger, the menu's layer, a live shield and the menu's closed shadow root count as inside; a later finger after the browser takes a pan is a new touch; a press whose target left the page ends at the next touch: verified in code and unit cases.
  • Description: a script pan handler beneath misses the one dismissing pan: verified (its moves stop at the hold).
  • Description: no public export, prop, type, default or attribute changes: verified.
  • Description: this revision only merges main (20 commits), with no conflict, the DropdownMenu record unchanged and the pull request's own code unchanged: verified (the merged tree equals this revision's tree; the own patch is identical).
  • Description: the earlier device results do not carry to this revision and the new side-by-side is pending: agreed; this is the blocking item above.
  • Description: the strict preflight at this revision passes its unit, node and accessibility steps, and its full interaction run has one failure whose cause is open: stated, not rerun; noted above as non-blocking.
  • Description: first-load size deltas and red-first counts: stated for earlier revisions, not rerun.
  • Files: the input hold, the outside-press module, DropdownMenu, the story, the three records, the release note and the five test files: unchanged since the previous review and clear apart from the device-evidence finding, with one non-blocking test note on the late-press case.

Automated review (maintainer link)

@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.

#12216: approved pending CI: CI has not run on this draft revision and runs once the pull request is marked ready for review. The code and the record text need no change, an engineering owner approved the record text at this revision, and the description now states this revision's iPhone and Android device results.

  • Not blocking: the input-hold test no longer checks that a late press's release is cancelled; that matches the hold, which now cancels only the press itself among pointer events.

#12179: approved (merged into main).

Whole stack: passes with the public API unchanged; a pull request lands only when it and every pull request below it are approved.

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (2): maintainer-account dismissal; its worked examples. Checked: the live reviews and the stored conversation; no dismissal and no owner change request, no finding.
  • Release note: under a finger or a pen, a touch outside an open DropdownMenu only closes it, and the control beneath gets no press, compatibility mouse event or click: verified in code and unit cases.
  • Release note: a tap closes the menu at its lift and a pan as it begins, while the page still scrolls and zooms: verified (no touch start or move of an outside press is cancelled; pan and pinch cases).
  • Release note: a mouse and the pinned popover presentation keep their behavior: verified (the scope takes only touch and pen and is armed only under the touch press model; unit cases).
  • Description: the menu takes the hold as its layer shows and releases it as it hides, and the newest menu's scope decides: verified (show and hide handlers; nested-menu cases).
  • Description: the hold cancels only the held press and a tap's touch end, never a touch start or move, and ends with its gesture and click window: verified.
  • Description: the trigger, the menu's layer, a live shield and the menu's closed shadow root count as inside; a later finger after the browser takes a pan is a new touch; a press whose target left the page ends at the next touch: verified in code and unit cases.
  • Description: a script pan handler beneath misses the one dismissing pan: verified (its moves stop at the hold).
  • Description: no public export, prop, type, default or attribute changes, and the new internal options and shared pan test are not exported: verified.
  • Description: the story gains a menu above a Switch, a Slider, a scrolling list and a swipe row, each with a counter: verified.
  • Description: this revision only merges main (20 commits), with no conflict, the DropdownMenu record unchanged and the pull request's own code unchanged: verified.
  • Description: a full device set ran at this revision side by side with the previous one, with no cell different: two Pixel 8 phones and an emulator pass 36 of 36 taps and pans, an iPhone 14 passes 14 of 14 in Safari and a Home Screen web app, and a desktop mouse passes: stated; accepted as the required device evidence.
  • Description: the strict preflight at this revision passes its unit, node and accessibility steps, and its one interaction failure, an AlertDialog storyboard test, is a harness timing gap that also occurs on main: stated, not rerun.
  • Description: the CLI test fix earlier runs needed is now on main, and the bottom pull request merged first on its own: verified.
  • Description: red-first counts, earlier device runs and first-load size deltas: stated for earlier revisions, not rerun.
  • Description: the record's pan-dismissal gap is removed: verified.
  • Files: the input hold, the outside-press module, DropdownMenu, the new unit cases, the grow test's mock, the new browser spec, the light-dismiss browser spec, the story, the three records and the release note: clear; the input-hold unit cases: one non-blocking note on the late-press case.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 28c87b9

@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.

#12216: approved pending CI. CI has started on this revision and has not finished yet; the merge guard waits for it. The code and the record text need no change, an engineering owner approved the record text at this revision, and the iPhone and Android device results stated for the previous revision still count, because this revision only merges main changes that touch nothing the pull request changes or imports.

  • Not blocking: the input-hold test no longer checks that a late press's release is cancelled; that matches the hold, which now cancels only the press itself among pointer events.

#12179: approved (merged into main).

Whole stack: passes with the public API unchanged; a pull request lands only when it and every pull request below it are approved.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (1): an owner's change request stays unresolved (its maintainer-account dismissal sub-rule and worked examples). Checked: the live reviews, review comments and issue comments and the stored conversation; no owner change request and no dismissal, no finding.
  • Release note: under a finger or a pen, a touch outside an open DropdownMenu only closes it, and the control beneath gets no press, compatibility mouse event or click: verified in code and unit cases.
  • Release note: a tap closes the menu at its lift and a pan as it begins, while the page still scrolls and zooms: verified (no touch start or move of an outside press is cancelled; pan and pinch cases).
  • Release note: a mouse and the pinned popover presentation keep their behavior: verified (the scope takes only touch and pen and is armed only under the touch press model; unit cases).
  • Description: before the change, a tap outside the open menu also pressed the control beneath, because the browser's light dismiss held nothing: verified (the base has no outside hold).
  • Description: the menu takes the hold as its layer shows and releases it as it hides, and the newest menu's scope decides: verified (show and hide handlers; nested-menu cases).
  • Description: the hold cancels only the held press and a tap's touch end, never a touch start or move, and ends with its gesture and click window: verified.
  • Description: the trigger, the menu's layer, a live shield and the menu's closed shadow root count as inside; a later finger after the browser takes a pan is a new touch; a press whose target left the page ends at the next touch: verified in code and unit cases.
  • Description: a script pan handler beneath misses the one dismissing pan: verified (its moves stop at the hold).
  • Description: no public export, prop, type, default or attribute changes, and the new internal options and shared pan test are not exported: verified.
  • Description: the story gains a menu above a Switch, a Slider, a scrolling list and a swipe row, each with a counter: verified.
  • Description: no file under the CLI package changes, and the bottom pull request merged first on its own: verified.
  • Description: the record's pan-dismissal gap is removed, and the record lines add no narration, research, change references or open questions: verified.
  • Description: the full device side-by-side (two Pixel 8 phones and an emulator, 36 of 36; an iPhone 14, 14 of 14; a desktop mouse) ran at the previous revision: stated, and it carries to this revision, which only merges main changes that touch none of the pull request's files, their direct imports or the shared motion and layer modules.
  • Description: the strict preflight at the previous revision passes its unit, node and accessibility steps, and its one interaction failure is a harness timing gap that also occurs on main: stated, not rerun.
  • Description: red-first counts, earlier device runs, unit-case counts and first-load size deltas: stated for earlier revisions, not rerun.
  • Files: the input hold, the outside-press module, DropdownMenu, the new unit cases, the grow test's mock, the new browser spec, the light-dismiss browser spec, the story, the three records and the release note: clear; the input-hold unit cases: one non-blocking note on the late-press case.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 24, 2026 19:14

@cixzhang cixzhang 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.

Approving at 28c87b9 (agent-made approval on behalf of the maintainer, per her 11/19 instruction for this stack, after CodeBunny ✓, CI green and Specs ✓ at this exact head; DEC-31 device set recorded).

@cixzhang cixzhang 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.

Re-approving at 28c87b9 after the full CI run completed green (agent-made approval on behalf of the maintainer, per her 11/19 instruction for this stack; CodeBunny ✓, CI green, Specs ✓ at this exact head). Supersedes the 20:20:52Z approval.

@vjeux
vjeux marked this pull request as draft November 24, 2026 20:35
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 15d7c2d

@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.

#12216: changes requested. The code and the record text need no change, an engineering owner approved the record text at this revision, and the iPhone 14 and Pixel 8 side-by-sides now stated here cover iOS Safari and one Android device.

  • Regression: the Android evidence at this revision needs a second device, because under spec:AST-094 DEC-27 a Pixel run counts only with one take of the same cell on another Pixel model or the emulator, and DEC-31's side-by-side runs on the same devices passed before; finish the emulator's tap and pan cells here, state each result in the description, and name the browser on the Android rows.

This corrects the earlier review, which asked for a Pixel 8 or the emulator.

#12179: approved, and already merged into main.

Whole stack: changes requested on the same finding; #12216 lands only when it and every pull request below it are approved.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules (0): none.
  • Claim: under a finger or a pen, a touch outside an open DropdownMenu only closes it. Verified: inputHold.ts:1308-1430 and the tap and pen cases in DropdownMenuOutsideTap.test.tsx.
  • Claim: the control beneath gets no press, no compatibility mouse events and no click. Verified: the same cases and the click rule at inputHold.ts:1511.
  • Claim: a tap closes the menu at its lift and a pan as it begins, and the page still scrolls and zooms. Verified: the pointermove and pointerup branches; touchstart is never cancelled and an outside press's touchmove stays passive.
  • Claim: a mouse and presentation="popover" keep their behavior. Verified: inputHold.ts:805, DropdownMenu.tsx:1375 and the mouse and popover cases.
  • Claim: no public API changes; the new options type and hasPanBegun stay internal. Verified: no package entry re-exports them.
  • Claim: the menu takes the scope as it shows, releases it as it hides, and the newest menu's scope decides. Verified: DropdownMenu.tsx:1160 and :1083, inputHold.ts:1196 and the newest-scope case.
  • Claim: the trigger, the menu's layer, a live shield and a closed shadow root count as inside. Verified: inputHold.ts:642-663.
  • Claim: a second finger joins only while a held pointer is down, and after the browser takes a pan a later finger is a new touch. Verified: inputHold.ts:1315 and :1422 and the second-finger case.
  • Claim: a press whose target left the page ends at the next touch. Verified: the touchstart prune and the scrim case.
  • Claim: the outside-tap unit file has 16 cases. Verified by count.
  • Claim: this revision only merges six main commits, with no conflict, no change to the pull request's files and an unchanged DropdownMenu record. Verified from history.
  • Claim: the merge changes Icon/index.ts, which DropdownMenu.tsx imports. Verified: DropdownMenu.tsx:64.
  • Claim: Pixel 8 and iPhone 14 side-by-sides pass on both revisions, and the menu opens as a menu each time. Stated, not rerun; the emulator cells are still running (the finding above).
  • Claim: pass counts, red-first counts, size deltas and preflight tallies. Stated, not rerun.
  • File .changeset/menu-outside-tap-swallow.md: clear.
  • File apps/storybook/stories/DropdownMenu.stories.tsx: clear.
  • File docs/architecture/layer-runtime.md: clear (owner-approved).
  • File docs/specs/AST-094-touch-presentations/spec.md: clear (owner-approved).
  • File docs/specs/components/DropdownMenu/DropdownMenu.spec.md: clear (owner-approved).
  • File packages/core/src/DropdownMenu/DropdownMenu.tsx: code clear; its direct import Icon/index.ts changed in the merge (device evidence finding).
  • File packages/core/src/DropdownMenu/DropdownMenuOutsideTap.test.tsx: clear.
  • File packages/core/src/DropdownMenu/DropdownMenuTouchGrow.test.tsx: clear.
  • File packages/core/src/DropdownMenu/__tests__/DropdownMenuOutsideTap.interaction.browser.spec.ts: clear.
  • File packages/core/src/Layer/__tests__/LayerPanLightDismiss.interaction.browser.spec.ts: clear.
  • File packages/core/src/Layer/inputHold.test.tsx: non-blocking note (a late press's pointerup is no longer asserted).
  • File packages/core/src/Layer/inputHold.ts: clear.
  • File packages/core/src/Layer/outsidePress.ts: clear.

Automated review (maintainer link)

This branch was successfully deployed

1 active deployment
Preview — 15d7c2d4 Deployed Nov 24, 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