Skip to content

Review 5350

Cindy Zhang edited this page Aug 23, 2026 · 2 revisions

Review 5350 — DateInput: clearing on touch jumps the page

#5350 · imdreamrunner · internal (ENGOWNERS) Merged by the author mid-review; the draft is recorded for the findings. A/B vibe test — B's radius table produced both findings.

Problem

On touch, clearing a TouchDateField scrolls the page to the top: the clear handler focuses the field synchronously inside the tap, and the browser scrolls the focused element into view.

Solution

Defer the focus out of the gesture task, with an Effect that cleans up the pending call on unmount.

API · Theme · Breaking · Performance

No API change, no theme targets, no breaking on any axis, no perf cost. Low-risk by R19 on all four conditions — no surface, no regression, no perf cost, nothing grew.

Judgement

  1. The same jump is one component away. The fix lives in TouchDateField, but the mechanism — focus inside the tap — belongs to the shared clear button. InputClearButton does the same thing for every input that has one.
  2. The new test pins setTimeout rather than the behavior. Asserting activeElement after timers survives moving the fix.

Where the findings came from

Both from the radius pass, neither reachable from the rubric — which points at DateInput and has nothing to say about the component next door. "Where does the fix not reach" produced the headline; "what would an unevadable fix look like" exposed the missing variant.

The near-miss that produced R14i

Arm A drafted request-changes with a different finding first: focus is lost when changeAction disables the field mid-clear. jsdom said the PR introduced it. Real WebKit said main does the same — WebKit blurs a newly-disabled element, jsdom does not. The verdict flipped to approve on that one check. → R14i: jsdom cannot tell you something is a regression; a delta claim is a two-sided measurement in a real engine.

Could not verify

Whether the iOS jump is real or whether deferral fixes it — WebKit will not run on this Mac and Chromium shows nothing in any variant. That is why finding 2 was written as a question, not a recommendation.

Open follow-up

The class finding has no home now the PR is merged: an issue against InputClearButton is owed.

Clone this wiki locally