Skip to content

Public pages are non-interactive on first load — real pointer presses fire nothing #450

Open

Description

@thinkclay

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: false on the DOM node, no aria-disabled.
  • Nothing overlaying it — document.elementFromPoint at the button's centre returns the button itself; pointer-events: auto for 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"], with onClick a 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

  1. Confirm with a physical mouse on /jobs/<slug> at mobile width, signed out.
  2. If confirmed, check expo-router / react-native-web upstream issues for SDK 56 + SSR before writing any local workaround.
  3. 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

  1. thinkclay commented on Aug 12, 2026

    @thinkclay
    ContributorAuthor

    Possible root cause identified in the 2026-08-11 profile audit: ScaffaldLogo derives its SVG gradient id from Math.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.

  2. thinkclay commented on Sep 10, 2026

    @thinkclay
    ContributorAuthor

    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.

    react-native-web registers document-level responder listeners…

    True. modules/useResponderEvents/ResponderSystem.js:537-546 attaches listeners on document.

    …that preventDefault() on pointerdown

    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:

    var documentEventsCapturePhase = ['blur', 'scroll'];
    var documentEventsBubblePhase = [
      'mousedown', 'mousemove', 'mouseup', 'dragstart',
      'touchstart', 'touchmove', 'touchend', 'touchcancel',
      'contextmenu', 'select', 'selectionchange'];

    2. It never calls preventDefault in a press path. There are exactly seven .preventDefault() call sites in the whole package. The only three in PressResponder are:

    site when
    onKeyDown spacebar, on a non-native button, to stop the page scrolling
    onClick only if _longPressDispatched or _selectionTerminated
    onContextMenu only when onLongPress is set and the pointer is touch

    The remaining four are in TextInput, Touchable, PanResponder and VirtualizedList — none in this path. The preventDefault in createResponderEvent.js:48 is 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 trailing click → handler does not fire" — reads like a smoking gun, but it is documented behaviour. From PressResponder.js:298-310, immediately above onClick:

    click event must be used but is dispatched in many scenarios where no pointers are on the screen. […] The onPress callback is only be called on the first ancestor of the native click target that is using the PressResponder.

    RNW's onPress requires a real click event. 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 → pointerup over that button not produce a click event?

    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 click event get dispatched at all". A bare document.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

    1. With a physical press on /jobs/<slug> at mobile width, signed out: does a capture-phase click listener on document fire? If yes, the click exists and the fault is between the click and onPress. If no, the click is never dispatched and this is a target-identity problem.
    2. If no click: log event.target for mousedown and mouseup and 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.
    3. Only if both of those come back clean is an upstream expo-router / RNW issue search worth the time.

    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.

  3. thinkclay commented on Sep 10, 2026

    @thinkclay
    ContributorAuthor

    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:

    Hydration failed … As a result this tree will be regenerated on the client.

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrontendUXbugpriority: high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions