Skip to content

press/click: refuse a zero-area target instead of tapping its origin #3841

Open

Description

@thymikee

A selector that resolves to a zero-size node is tapped at the node's origin, and the command reports success.

Found on a physical iPhone in #1296 (comment). On SpringBoard home page 2, the page-1 icons stay in the tree with 0×0 rects and hittable: false. press 'label="Clock"' resolves to (0, 0), taps there, and reports success.

Cause on main: normalizeRect (packages/kernel/src/rect-center.ts) refuses only a negative width or height, so a 0×0 rect passes. resolveInteractionTouchPoint (packages/selectors/src/interaction-touch-point.ts) then returns the rect's center as a resolved point.

Required behavior:

  • resolveInteractionTouchPoint returns invalid for a target with zero width or zero height. Do not change normalizeRect, because other readers use zero-size rects legitimately.
  • A zero-area target refuses the interaction with the existing typed reason for an unresolvable point. Do not match error text.
  • A regression test in packages/selectors fails before the fix and passes after it. Add one command-level case that shows press refuses and does not dispatch a tap.

Activity

  1. added a commit that references this issue on Oct 20, 2026
    3ea91a3
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions