Repository navigation
Description
Split out of #438, which was closed as not-planned. The getServerSnapshot half of that issue is genuinely addressed (Scaffald/ui#14 → PR #446), but this half is unresolved and materially worse, so it needs its own issue rather than living in comments on a closed one.
Symptom
On a fresh load of a public page at 375×812, no button responds to a real press. Confirmed on /jobs/<slug> (signed out, so it redirects to /auth, and the login form + cookie banner are what's on screen):
- Cookie banner Reject → nothing written to
localStorage, banner stays up - Sign in with password → password field never appears
- Splash Skip → nothing
This is not banner-specific. It's every interactive element on the page.
Evidence
Same Reject button, one fresh page load, three ways of pressing it:
| Method | Handler fires? |
|---|---|
Real mouse click (CDP Input.dispatchMouseEvent, coords verified against a 2× DPR screenshot) |
❌ no |
Synthetic pointerover/enter/down + mousedown + pointerup/mouseup, no trailing click |
❌ no |
element.click() (dispatches only a click event) |
✅ yes — consent written |
Ruled out:
- Not disabled —
disabled: falseon the DOM node, noaria-disabled. - Nothing overlaying it —
document.elementFromPointat the button's centre returns the button itself;pointer-events: autofor ten ancestors up; no ancestor carries responder or scroll handlers. - React is hydrated — the node has
__reactFiber$…and__reactProps$…; the root has__reactContainer$…. - The handler exists — props are
["onMouseEnter","onMouseLeave","onKeyDown","onClick","onContextMenu","onBlur","onFocus"], withonClicka live function.
So the press path is onClick-only, and a genuine pointerdown → pointerup → click sequence never reaches it.
Leading hypothesis (not confirmed)
react-native-web registers document-level responder listeners that preventDefault() on pointerdown, which in Blink can cancel the click that would otherwise follow. That would explain why a bare click event works and a real press doesn't. I did not verify this in RNW's source — treat it as the first thing to check, not a diagnosis.
Likely relevant: web went server-rendered in the apex consolidation (f7af27dc2), and this is the sort of fault that appears when SSR hydration and RNW's event system interact.
Important caveat before anyone builds a workaround
Every "real" click in my testing came through CDP. That's normally indistinguishable from human input, but if RNW's behaviour depends on trusted-sequence specifics, a physical mouse may behave differently. The original reporter observed the same dead buttons independently, which suggests it's real for humans — but someone should confirm with a physical click first. Building an RNW workaround against a harness artifact would be worse than doing nothing.
Suggested next steps
- Confirm with a physical mouse on
/jobs/<slug>at mobile width, signed out. - If confirmed, check expo-router / react-native-web upstream issues for SDK 56 + SSR before writing any local workaround.
- Check whether it reproduces against the deployed apex as well as the dev server — prod has been serving fine, which may mean this is dev-only, and that materially changes priority.
Why it matters
If it reproduces in production, every visitor to the marketing landing, job listings and profiles gets a page they cannot interact with on first load. That's the whole public funnel. If it's dev-only, it's still a significant DX tax.
Related: #438 (closed), PR #446, and the sibling fault filed separately.
Activity
thinkclay commentedon Aug 12, 2026
Possible root cause identified in the 2026-08-11 profile audit:
ScaffaldLogoderives its SVG gradient id fromMath.random(), so hydration fails and React discards the tree on every SSR page — see #582. Worth re-testing this issue once that lands. Rollup: #594.thinkclay commentedon Sep 10, 2026
Checked the leading hypothesis against react-native-web's source, since the issue flags it as unverified and "the first thing to check". It does not hold.
Version checked:
[email protected]as installed.The hypothesis has two halves. The first is true, the operative one is not.
True.
modules/useResponderEvents/ResponderSystem.js:537-546attaches listeners ondocument.Not true, twice over.
1. It never listens to
pointerdown. The registered set is mouse and touch only — there is not a pointer event in it:2. It never calls
preventDefaultin a press path. There are exactly seven.preventDefault()call sites in the whole package. The only three inPressResponderare:onKeyDownonClick_longPressDispatchedor_selectionTerminatedonContextMenuonLongPressis set and the pointer is touchThe remaining four are in
TextInput,Touchable,PanResponderandVirtualizedList— none in this path. ThepreventDefaultincreateResponderEvent.js:48is a bound reference exposed on the responder event object for consumers to call, not something the system calls itself.So there is nothing in RNW cancelling the click.
The evidence table in this issue is consistent with RNW working correctly
Row 2 — "synthetic
pointerdown/mousedown/pointerup/mouseup, no trailingclick→ handler does not fire" — reads like a smoking gun, but it is documented behaviour. FromPressResponder.js:298-310, immediately aboveonClick:RNW's
onPressrequires a realclickevent. A down/up pair with no click legitimately does nothing, and row 3 (element.click()works) is the same fact from the other side. Neither row is evidence of a defect.What that leaves
All three rows collapse into one question, and it is not an RNW question:
Why does a genuine
pointerdown → pointerupover that button not produce aclickevent?The browser withholds the click when down and up do not resolve to the same target. Which makes the SSR angle this issue already suspects the thing to chase — specifically #681, "authenticated pages intermittently fail hydration and regenerate the tree". If the tree is replaced between down and up, the button the pointer went down on is not the button it came up on, and Blink fires no click. That would reproduce every row of the table exactly, including why the injected
click()succeeds.Worth noting the caveat in this issue still stands and now matters more: everything was measured through CDP. But the question to take to a physical mouse has changed — it is no longer "does the handler fire", it is "does a
clickevent get dispatched at all". A baredocument.addEventListener('click', …, true)at the root, with a physical press, answers it in one go and needs no RNW knowledge.Suggested next steps, replacing the two in the description
/jobs/<slug>at mobile width, signed out: does a capture-phaseclicklistener ondocumentfire? If yes, the click exists and the fault is between the click andonPress. If no, the click is never dispatched and this is a target-identity problem.event.targetformousedownandmouseupand compare. Different targets confirms the tree moved underneath the press, and this becomes a duplicate of the hydration work in SSR: authenticated pages intermittently fail hydration and regenerate the tree — the session load races the first client render #681/SSR: server and client disagree on React tree position in the app shell (the cause under #625) #679 rather than an event-system bug.I have not reproduced the symptom itself — no dev server here — so this narrows the search rather than closing it. But the RNW-cancels-the-click theory can be set aside, and no workaround should be built on it.
thinkclay commentedon Sep 10, 2026
Two notes from triaging for store readiness (#728).
This is web-only, and #728 says so explicitly. Native has no hydration step and no cookie banner, so nothing here blocks the iOS or Android submissions. That is not a downgrade — scaffald.com is live and this is a serious fault on it — but it was reading as a release blocker and it is not one.
A hypothesis worth testing before treating this as its own piece of work. #681 found that authenticated pages intermittently fail hydration with the severe variant:
Evidence there: three runs of the same code, same route — fails, clean, fails. It does not reproduce in an isolated probe at any viewport.
A regenerated tree has its event handlers detached until React re-renders it. That is exactly the symptom described here — every interactive element dead on first load, on a fresh load specifically, with
element.click()behaving differently from a real pointer press.So #450 and #681 may be one bug seen from two ends: #681 caught the mechanism, #450 caught what it does to a user. Worth checking whether the non-interactive loads correlate with the hydration failures before anyone fixes them separately.
If they are the same, #679 (server and client disagree on React tree position) is a plausible shared cause underneath both.