Repository navigation
fix(Layer): hold a press that landed during an input hold but arrives late - #13436
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 7af3891 |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| LayerProvider | 4.4 kB (0) · 20 B CSS (0) | — | ✓ · ✓ · ✗ |
| MobileNav | 79.4 kB (+746 B) · 11.8 kB CSS (0) | — | — · — · — |
| BottomSheet | 76.1 kB (+729 B) · 7.8 kB CSS (0) | — | — · — · — |
75 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| TopNav | 81.3 kB (+709 B) · 12.1 kB CSS (0) | — | — · — · — |
| DateInput | 208.5 kB (+693 B) · 18.9 kB CSS (0) | — | — · — · — |
| Dialog | 28.4 kB (+671 B) · 7.3 kB CSS (0) | — | — · — · — |
| AppShell | 101.3 kB (+664 B) · 14.9 kB CSS (0) | — | — · — · — |
| DateTimeInput | 232.4 kB (+663 B) · 20.6 kB CSS (0) | — | — · — · — |
| lab/MediaCaptionsButton | 223.7 kB (+658 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaFullscreenButton | 223.7 kB (+658 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaSeekButton | 223.7 kB (+658 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaTime | 223.7 kB (+658 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaTimeSlider | 223.7 kB (+658 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaVolume | 223.7 kB (+658 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaPlayButton | 223.7 kB (+657 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaPlaybackRate | 223.7 kB (+656 B) · 1.5 kB CSS (0) | — | — · — · — |
| CommandPalette | 83.3 kB (+654 B) · 13.5 kB CSS (0) | — | — · — · — |
| Drawer | 57.8 kB (+646 B) · 8.7 kB CSS (0) | — | — · — · — |
| Popover | 104.6 kB (+645 B) · 15.5 kB CSS (0) | — | — · — · — |
| SideNav | 124.3 kB (+643 B) · 12.5 kB CSS (0) | — | — · — · — |
| Pagination | 153.5 kB (+642 B) · 20.0 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 128.0 kB (+641 B) · 773 B CSS (0) | — | — · — · — |
| lab/ChatReactionBar | 129.2 kB (+638 B) · 1.1 kB CSS (0) | — | — · — · — |
| lab/Schedule | 118.1 kB (+635 B) · 3.9 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 315.5 kB (+622 B) · 454 B CSS (0) | — | — · — · — |
| lab/CommentComposer | 185.9 kB (+618 B) · 1.9 kB CSS (0) | — | — · — · — |
| lab/CommentThread | 381.5 kB (+618 B) · 2.4 kB CSS (0) | — | — · — · — |
| TimeInput | 180.6 kB (+613 B) · 17.8 kB CSS (0) | — | — · — · — |
| lab/VideoPlayer | 231.3 kB (+606 B) · 2.1 kB CSS (0) | — | — · — · — |
| Markdown | 208.7 kB (+602 B) · 23.4 kB CSS (0) | — | — · — · — |
| lab/Comments | 388.4 kB (+590 B) · 2.5 kB CSS (0) | — | — · — · — |
| Table | 124.5 kB (+587 B) · 21.1 kB CSS (0) | — | — · — · — |
| lab/AudioPlayer | 233.7 kB (+587 B) · 1.8 kB CSS (0) | — | — · — · — |
| MoreMenu | 113.9 kB (+584 B) · 19.8 kB CSS (0) | — | — · — · — |
| PowerSearch | 318.4 kB (+577 B) · 27.3 kB CSS (0) | — | — · — · — |
| TableCell | 106.7 kB (+577 B) · 20.1 kB CSS (0) | — | — · — · — |
| ContextMenu | 105.4 kB (+571 B) · 19.6 kB CSS (0) | — | — · — · — |
| DropdownMenu | 113.6 kB (+570 B) · 19.8 kB CSS (0) | — | — · — · — |
| Selector | 120.4 kB (+560 B) · 19.7 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 106.5 kB (+560 B) · 20.0 kB CSS (0) | — | — · — · — |
| AlertDialog | 133.4 kB (+552 B) · 16.2 kB CSS (0) | — | — · — · — |
| MultiSelector | 108.8 kB (+38 B) · 18.9 kB CSS (0) | — | — · — · — |
| lab/PageControl | 79.0 kB (+26 B) · 709 B CSS (0) | — | — · — · — |
| TopNavMenu | 86.9 kB (+16 B) · 12.4 kB CSS (0) | — | — · — · — |
| ContextMenuItem | 38.6 kB (+14 B) · 7.3 kB CSS (0) | — | — · — · — |
| ToggleButtonGroup | 42.0 kB (+14 B) · 3.7 kB CSS (0) | — | — · — · — |
| lab/TabBar | 84.5 kB (+14 B) · 1.8 kB CSS (0) | — | — · — · — |
| lab/NavigationScreen | 86.1 kB (+13 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/NavigationStack | 86.1 kB (+13 B) · 1.5 kB CSS (0) | — | — · — · — |
| NavHeadingMenu | 18.8 kB (+12 B) · 3.5 kB CSS (0) | — | — · — · — |
| Toast | 107.0 kB (+12 B) · 11.5 kB CSS (0) | — | — · — · — |
| lab/ChatVirtualizer | 57.7 kB (+12 B) · 223 B CSS (0) | — | — · — · — |
| ButtonGroup | 44.8 kB (+11 B) · 3.7 kB CSS (0) | — | — · — · — |
| ToggleButton | 94.5 kB (+11 B) · 11.3 kB CSS (0) | — | — · — · — |
| TopNavHeading | 87.5 kB (+11 B) · 12.4 kB CSS (0) | — | — · — · — |
| Switch | 111.1 kB (+10 B) · 10.4 kB CSS (0) | — | — · — · — |
| TabMenu | 84.0 kB (+10 B) · 12.3 kB CSS (0) | — | — · — · — |
| BreadcrumbItem | 102.2 kB (+9 B) · 14.0 kB CSS (0) | — | — · — · — |
| Lightbox | 150.8 kB (+9 B) · 12.3 kB CSS (0) | — | — · — · — |
| SideNavHeading | 87.8 kB (+9 B) · 12.5 kB CSS (0) | — | — · — · — |
| Slider | 116.2 kB (+9 B) · 9.2 kB CSS (0) | — | — · — · — |
| SegmentedControl | 103.5 kB (+6 B) · 7.2 kB CSS (0) | — | — · — · — |
| DropdownMenuSubMenu | 80.3 kB (+4 B) · 11.0 kB CSS (0) | — | — · — · — |
| SelectorOption | 24.6 kB (+2 B) · 6.8 kB CSS (0) | — | — · — · — |
| Tokenizer | 112.5 kB (+2 B) · 21.9 kB CSS (0) | — | — · — · — |
| ListItem | 81.1 kB (+1 B) · 12.5 kB CSS (0) | — | — · — · — |
| CheckboxListItem | 82.0 kB (0) · 12.5 kB CSS (0) | — | — · — · — |
| Item | 20.8 kB (0) · 6.2 kB CSS (0) | — | — · — · — |
| RadioListItem | 78.1 kB (0) · 11.1 kB CSS (0) | — | — · — · — |
| lab/TabBarItem | 3.9 kB (0) · 1.8 kB CSS (0) | — | — · — · — |
| lab/TransferList | 138.7 kB (0) · 1.2 kB CSS (0) | — | — · — · — |
| lab/TransferListSelector | 150.6 kB (0) · 1.4 kB CSS (0) | — | — · — · — |
| DropdownMenuCheckboxItem | 29.3 kB (−1 B) · 7.6 kB CSS (0) | — | — · — · — |
| DropdownMenuItem | 28.5 kB (−1 B) · 7.1 kB CSS (0) | — | — · — · — |
| DropdownMenuRadioItem | 29.4 kB (−1 B) · 7.6 kB CSS (0) | — | — · — · — |
| lab/TabBarMoreList | 104.2 kB (−1 B) · 1.8 kB CSS (0) | — | — · — · — |
| layer | — | — | — · ✓ · — |
| Layer | — | — | ✓ · ✓ · — |
Package size: @astryxdesign/core 7.96 MB packed (+3.9 kB); no new dependencies.
Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-rtl for RTL.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Changes requested. Judging a press by the time the finger went down is the right fix for the late tap, and the new Chromium case proves it for a short press; the points below need fixing before approval.
- A press that a long task delivered late and that stays down more than 500 ms after the release is not held to its end: the timer armed at the release still calls
stop()while the press is down, so itspointerup,touchendandclickreach the page, and callingsettle()after the late press is added topointersortouches, with a regression case, fixes it. noteInputAtandwasHeldAtdecide on their own whetherevent.timeStampis on the page's clock, whileutils/inputAge.tstimeOnalready owns that decision, wall-clock stamps included, so please judge both bytimeOn, or extend it and say why.- The changeset says such a tap "no longer acts when a busy page delivers it after the entrance", but the hold covers only a release after a gap of more than two frame intervals and a press that arrives within 500 ms, so please narrow the wording to that.
- The defect was found on Pixel phones and the fix depends on Chrome's touch time stamps, so the description needs an Android Chrome run at this head (emulator or Pixel), stated in text: device, browser, head, animation scale, and the held-menu result under reduced motion.
Claims and files checked
Review mode: same-head; reason: none
- Claim: on a phone, a tap that lands while a menu enters can pick a row, as device runs of an earlier menu pull request found under reduced motion. Verified from that pull request's device section (5 of 16 held presses acted); that the cause was late delivery is inferred.
- Claim: main judged a press when the engine dispatched it. Verified: main's
pointerdownbranch callsholdsPressAtat dispatch. - Claim: a long task can deliver a press after the release, and its tap then clicks the action beneath. Verified: the new Chromium case fails with main's
inputHold.ts, and the click lands on the popover action. - Claim: after a long-task release, a press that went down during the ended hold is held to its end. False for a press that stays down more than 500 ms after the release.
- Claim: both of a finger's starts carry one time, so one press gets one verdict. Verified:
wasHeldAtjudgespointerdownandtouchstartbyevent.timeStamp; unit case. - Claim: FR35 and INV16 govern, and FR24 still holds. Verified: resource counts after a release in time, at the cap, on unmount and in a hidden tab.
- Claim: the hold asks for one frame at a time, and the release cancels it. Verified:
watchFramesandrelease; unit case. - Claim: only a release after more than two of the hold's frame intervals with no frame waits for late presses. Verified:
isAfterLongTask,LATE_RELEASE_FRAMES= 2. - Claim: the wait keeps the ended hold's scope, for at most 500 ms. Verified:
wasHeldAt; the surface-scope unit case. - Claim: later-stamped input or the layers leaving ends the wait, a release in time waits for nothing, and no API or default changes. Verified:
noteInputAt, the layer watch, unit cases; the API generator lists no rows. - Claim: ten unit cases and the new browser case fail with main's
inputHold.ts. Verified: 10 of 56 fail, and the browser case fails. - Claim: the browser case also fails at two earlier heads of related pull requests. Not reproduced.
- Claim: with the change, 56 of 56 unit and 16 of 16 Chromium cases pass, and the new case passes when repeated. Verified: 56 of 56, 16 of 16, and 8 of 8 repeated.
- Claim: the callers' suites pass, 3,771 of 3,771. Partly verified: 3,714 of 3,714 without the media player suites.
- Claim: 0 of 40 releases in time opened a wait, and 40 of 40 did with a 150 ms task. Not reproduced.
- Claim: WebKit skips the new browser case because its test input stamps touches at dispatch. Verified in the spec; the WebKit reason was not run.
- Claim: strict ESLint and Prettier pass on the changed files. Verified.
- Claim: the gate opens for gaps over about 17 ms at 120 Hz and 33 ms at 60 Hz, against device leads of 28 to 35 ms. Verified: twice the frame interval; the earlier device runs report those leads.
- Claim: one defect, no tagalongs, no new public API, default or interaction model, and no internal context. Verified.
- Claim: no real phone has run this head. Stated; it leaves the Android evidence missing.
- Claim (changeset): a tap that lands during an entrance no longer acts when a busy page delivers it later. False as worded: the long-task gate and the 500 ms cap bound it.
- File
packages/core/src/Layer/inputHold.ts: a late press escapes after 500 ms, and the clock check duplicatesutils/inputAge. - File
packages/core/src/Layer/inputHold.test.tsx: clear, but it has no case for a late press held pastLATE_PRESS_MS. - File
packages/core/src/Layer/__tests__/inputHold.interaction.browser.spec.ts: clear; it covers a short late tap. - File
packages/core/src/Layer/__tests__/inputHold.fixture.ts: clear. - File
.changeset/input-hold-late-press.md: its wording is broader than the fix.
… late A busy main thread can dispatch a finger's press after the task that ends an input hold, though the finger went down while the hold was on. The press hold judged each press when it arrived, so such a press reached the page: a tap that landed while a menu entered could pick a row. The press hold now judges a press by its event's own time, on the page's clock (utils/inputAge's timeOn). After a release in a long task, a press that went down during the ended hold is taken, within that hold's scope, if it arrives at most LATE_PRESS_MS after the end. A press it takes is held to its end, as one held during the hold is. The hold reads a long task from the frames the page drew while it held: no frame for more than LATE_RELEASE_FRAMES of its frame intervals. Both of a finger's starts carry one time, so one press gets one verdict. A release in time waits for nothing, as before. Input stamped at or after the end, the cap, or the layers leaving the page end the wait.
7af3891 to
e43cef4
Compare
|
/approve-spec e43cef4 |
There was a problem hiding this comment.
Changes requested. The code is unchanged since the last review and no code point stands; the new Android emulator run is the one remaining point before approval.
- The Android Chrome run is on a build of #11859's head with this pull request's five files applied, not on this head, and the touch-presentation spec asks for Android evidence at the exact head (or carried across a
mainmerge of this same pull request), so please take the same forced-task run at this head, where DropdownMenu's own entrance hold runs the late-press path under a finger, and state it in text: emulator or Pixel, browser, head, animation scale (normal and removed), slow-device profile, the result, and the spot check on a second device.
Two non-blocking comment-style notes (inputHold.ts lines 111 and 925) still stand.
Claims and files checked
Review mode: same-head; reason: none
- Claim: on a phone, a tap that lands while a menu enters can pick a row when a busy main thread delivers it after the entrance ends, as the menu pull request's device runs found under reduced motion. Verified from that pull request's device section; not re-run on a device.
- Claim: the hold judged a press when the engine dispatched it, so a press a long task delays past the release reaches the row. Verified: main's
pointerdownbranch asksholdsPressAtat dispatch, and both new Chromium cases fail with main'sinputHold.ts. - Claim: after a release in a long task, a press is judged by its event time on the page's clock (
timeOn), and a press that went down during the ended hold is held to its end. Verified:timeOfInput,wasHeldAtandsettle()after a held press (inputHold.ts:911,:968,:1109,:1157); the long-press Chromium case. - Claim: both of a finger's starts carry one time, so one press gets one verdict. Verified: the split-press unit case.
- Claim: the touch-presentation input rule and the one-input-hold rule govern, and nothing stays after the last instance unmounts. Verified: unit cases count listeners, timers and frame requests after a release in time, after a long press, at the cap, on unmount and in a hidden tab.
- Claim: while a layer is held the hold asks for one frame at a time, and the release cancels it. Verified:
watchFramesandrelease; unit case. - Claim: only a release after more than two of the hold's frame intervals with no frame waits for late presses. Verified:
isAfterLongTask,LATE_RELEASE_FRAMES= 2; the 30 Hz and frame-end unit cases. - Claim: for at most 500 ms the wait takes a late press within the ended hold's scope and holds it to its end. Verified:
wasHeldAt; the cap and surface-scope unit cases. - Claim: later-stamped input or the layers leaving end the wait, a release in time waits for nothing, and no API or default changes. Verified:
noteInputAt, the layer watch and unit cases; no public surface changes. - Claim: in Chromium the delayed tap clicks the action on main, and with the change it is held and the next tap clicks. Verified: both new browser cases.
- Claim: a release in time leaves no listener, timer or frame request, and a late press beside a surface hold reaches the page. Verified: unit cases.
- Claim: twelve of 58 unit cases and both new browser cases fail with main's
inputHold.ts. Verified. - Claim: the first browser case fails the same way at an earlier head of the menu pull request and at a related pull request's head, both carrying main's
inputHold.ts. Both carry main's file (verified); the failure there was not reproduced. - Claim: at this pull request's first head, the long-press and wall-clock unit cases fail, and the second browser case lets the release, end and click through. Verified.
- Claim: with the change, 58 of 58 unit cases, 17 of 17 Chromium cases, and each new case 12 of 12 when repeated pass. Verified; the unit cases pass again here.
- Claim: the callers' suites pass, 3,779 of 3,779. Verified.
- Claim: a local probe saw no wait in 0 of 40 releases in time and a wait in 40 of 40 with a 150 ms task. Not reproduced; the probe is not in the pull request.
- Claim: a second local probe on DropdownMenu in Chromium saw 10 of 10 late presses act without the change and 0 of 10 with it. Not reproduced; the probe is not in the pull request.
- Claim: WebKit skips the new browser cases because its test input stamps touches at dispatch. Verified for both new cases in the spec; WebKit was not run.
- Claim: strict ESLint and Prettier pass on the changed files. Verified.
- Claim: the gate opens for gaps over about 17 ms at 120 Hz and 33 ms at 60 Hz, which covers the device leads of 28 to 35 ms at 120 Hz. Verified: twice the median frame interval.
- Claim: the strict preflight with browser checks passes at this head and reports "ready to flip", with the full Chromium suite selected. Stated; the full suite was not re-run here (the preflight prints "ready to flip" only when nothing failed or went unbuilt).
- Claim: no real phone has run this head. Stated.
- Claim: an Android emulator ran a build of a related pull request's head with this pull request's five files applied, byte-identical to this head. Verified: the build's five files match this head's; the rest of its tree is that pull request's, with DropdownMenu, Popover surface-motion and menu-press changes on an older
main. - Claim: on that build, late presses picked the row without the change (4 of 4, 3 of 3, 7 of 7) and none acted with it (0 of 1, 0 of 4, 0 of 8), and every press stamped before the release was held. Stated in text; it is not at this head.
- Claim:
mainhas no page that runs this path at the menu pull request's hold timing, so the run is not at this head. True for that timing; this head's DropdownMenu entrance hold (DropdownMenu.tsx:1308) runs the same path under a finger. - Claim: one defect, no tagalongs, no new public API, default or interaction model, and no internal context. Verified.
- Claim (changeset): a tap during an entrance no longer acts when a long task ends the entrance, and it is held if it arrives within 500 ms of that end. Verified:
isAfterLongTaskand thewasHeldAtcap. - File
packages/core/src/Layer/inputHold.ts: clear; two non-blocking comment notes. - File
packages/core/src/Layer/inputHold.test.tsx: clear; 12 new cases fail with main's hold. - File
packages/core/src/Layer/__tests__/inputHold.interaction.browser.spec.ts: clear; both new cases fail with main's hold. - File
packages/core/src/Layer/__tests__/inputHold.fixture.ts: clear. - File
.changeset/input-hold-late-press.md: clear.
| ended: (hold: EndedHold) => void; | ||
| } | ||
|
|
||
| /** A hold that has ended: what it held, and when it began and ended. */ |
There was a problem hiding this comment.
Non-blocking (comment style): this restates the fields. The constraint a reader needs is the clock. Suggested: /** An ended hold. `from` and `to` are on its window's `performance.now()` clock, which `event.timeStamp` uses. */
| }; | ||
|
|
||
| /** | ||
| * Forgets each ended hold that `isDone` names, and each one past its late |
There was a problem hiding this comment.
Non-blocking (comment style): this leaves out the branch that forgets a hold whose layer left the page. Suggested: Forgets each ended hold that `isDone` names, that is past its late window, or whose layer left the page. Returns whether it forgot one.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because the pull request is a draft; its checks run once it is marked ready for review.
The Android emulator run at this exact head closes the one open point from the last review, and no code point stands. Two non-blocking comment-style notes (inputHold.ts lines 111 and 924-927) still stand.
Claims and files checked
Review mode: same-head; reason: none
- Claim: on a phone, a tap that lands while a menu enters can pick a row when a busy main thread delivers it after the entrance ends, as the menu pull request's device runs found under reduced motion. Verified from that pull request's device results; not re-run on a phone.
- Claim: the hold judged a press when the engine dispatched it, so a press a long task delays past the release reaches the row. Verified:
main'spointerdownbranch asksholdsPressAtat dispatch, and both new Chromium cases fail withmain'sinputHold.ts. - Claim: after a release in a long task, a press is judged by its event time on the page's clock (
timeOn), and one that went down during the ended hold is held to its end. Verified:timeOfInput,wasHeldAtandsettle()after a held press (inputHold.ts:911,:968,:1109,:1157); the long-press Chromium case. - Claim: both of a finger's starts carry one time, so one press gets one verdict. Verified: the split-press unit case.
- Claim: the touch-presentation input rule and the one-input-hold rule govern, and nothing stays after the last instance unmounts. Verified: unit cases count listeners, timers and frame requests after a release in time, after a long press, at the cap, on unmount and in a hidden tab.
- Claim: while a layer is held the hold asks for one frame at a time, and the release cancels it. Verified:
watchFramesandrelease; unit case. - Claim: only a release after more than two of the hold's frame intervals with no frame waits for late presses. Verified:
isAfterLongTask,LATE_RELEASE_FRAMES= 2; the 30 Hz and frame-end unit cases. - Claim: for at most 500 ms the wait takes a late press within the ended hold's scope and holds it to its end. Verified:
wasHeldAt; the cap and surface-scope unit cases. - Claim: later-stamped input or the layers leaving end the wait, a release in time waits for nothing, and no API or default changes. Verified:
noteInputAt, the layer watch and unit cases; no public surface changes. - Claim: in Chromium the delayed tap clicks the action on
main; with the change it is held and the next tap clicks, and a late press beside a surface hold reaches the page. Verified: both new browser cases and the surface-scope unit case. - Claim: twelve of 58 unit cases and both new browser cases fail with
main'sinputHold.ts, and the first browser case fails the same way on two related pull requests' heads that carrymain's file. The twelve and both cases verified; both related heads carrymain's file (verified), and their failure was not reproduced. - Claim: at this pull request's first head, the long-press and wall-clock unit cases fail, and the second browser case lets the release, end and click through. Verified.
- Claim: with the change, 58 of 58 unit cases, 17 of 17 Chromium cases and 12 of 12 repeats of each new case pass. Verified; the unit cases pass again here.
- Claim: the callers' suites pass, 3,779 of 3,779. Verified.
- Claim: local probes saw no wait after releases in time, a wait after a 150 ms task, and DropdownMenu late presses that act on
mainbut not with the change. Not reproduced; the probes are not in the pull request. - Claim: WebKit skips the new browser cases because its test input stamps touches at dispatch. Verified: both cases skip without scripted touch times; WebKit was not run.
- Claim: strict ESLint and Prettier pass on the changed files. Verified.
- Claim: the gate opens for gaps over about 17 ms at 120 Hz and 33 ms at 60 Hz, which covers the device leads of 28 to 35 ms at 120 Hz. Verified: twice the median frame interval.
- Claim: the strict preflight with browser checks passes at this head and selects the full Chromium suite. Stated; not re-run.
- Claim: no real phone has run this head. Stated.
- Claim: an Android emulator with Chrome 145 ran Storybook builds of this head and of its parent on
main, in DropdownMenu's tall-content story, whose menu holds touch input until its entrance ends. Verified: the story and its entrance hold exist at this head, and the run's committed record names the same builds, browser and keyboard. - Claim: with a 100 ms task forced into the entrance's end, late presses picked the row on
main(12 of 12 with animations removed, 12 of 12 at normal scale, 9 of 9 at 4× CPU) and none acted at this head (0 of 12, 0 of 12, 0 of 10), with 5 of 5 against 0 of 6 in an earlier 4× CPU pass. Verified against the run's record; not re-run. - Claim: a second, fresh emulator with a Pixel 9 Pro profile gave 4 of 4 on
mainagainst 0 of 4 at this head. Verified against the run's record; not re-run. - Claim: an earlier emulator run on a related pull request's head with these five files applied held every press stamped before the release. Stated; that build's five files match this head's (verified), and the rest of its tree is the other pull request's.
- Claim: one defect, no tag-alongs, no new public API, default or interaction model, and no internal context. Verified.
- Claim (changeset): a tap during an entrance no longer acts when a long task ends the entrance, and it is held if it arrives within 500 ms of that end. Verified:
isAfterLongTaskand thewasHeldAtcap. - File
packages/core/src/Layer/inputHold.ts: clear; two non-blocking comment notes. - File
packages/core/src/Layer/inputHold.test.tsx: clear; 12 new cases fail withmain's hold. - File
packages/core/src/Layer/__tests__/inputHold.interaction.browser.spec.ts: clear; both new cases fail withmain's hold. - File
packages/core/src/Layer/__tests__/inputHold.fixture.ts: clear. - File
.changeset/input-hold-late-press.md: clear.
User impact
On a phone, a tap that lands while a menu enters can pick a row. It can happen when a busy main thread delivers the tap after the entrance ends. Device runs of #8080 found it under Reduce Motion, at its earlier and current heads.
Problem and solution fit
While a touch presentation enters, the layer runtime's input hold swallows each new finger press. It judged a press when the engine dispatched it. A long task can end the hold and delay a press past that end. The shield is gone then, so the press picks the row.
After a release in a long task, the press hold now judges a press by its event time, on the page's clock (
timeOn). A press that went down during the ended hold is held to its end. Both of a finger's starts carry one time, so one press gets one verdict.Expected behavior and authority
spec:AST-094FR35: a tap that lands while a touch presentation is still entering MUST NOT close it, or reach anything beneath it.architecture:layer-runtimeINV16: the runtime's one input hold keeps that input away. FR24 still holds: nothing stays after the last instance unmounts.Smallest restoration
LATE_PRESS_MS, 500 ms, the wait takes a late press within the ended hold's scope. It holds that press to its end.Evidence
'surface'hold reaches the page.inputHold.ts.Scope
Components: the Layer input hold (
Layer/inputHold.ts)Testing
inputHold.ts, at main 0ed091c:inputHold.test.tsxfails 12 of 58. They cover the late, split and long presses, wall-clock stamps, the 30 Hz and frame-end cases, and the scope. The others pin the cap, the unmount, the frame requests, the release in time and the hidden tab.__tests__/inputHold.interaction.browser.spec.ts:396and:431.inputHold.ts.inputHold.ts(7af3891), the long press and the wall-clock stamp fail. In the:431case, the press's pointerup, touchend and click reached the page.inputHold.test.tsxpasses 58 of 58. The browser spec passes 17 of 17 in Chromium, and each new case 12 of 12 when repeated.inputHold.ts, at feat(DropdownMenu): a finger's open grows the menu out of its trigger #8080's head b01d48c, 10 of 10 such late presses acted. With this change, at 2b75997, 0 of 10 acted.pnpm preflight --browserpasses at e43cef4, and it reports "ready to flip".ASTRYX_STRICT_LINT=1. Its Chromium interaction step passes 1,904 tests and skips 54.core-dropdownmenu--tall-content-overflow). Its menu holds touch input until its CSS entrance ends.evidence/13436-stack-plus-fix-2b75997fbranch.