You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
press/click: refuse a zero-area target instead of tapping its origin #3841
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
fix(interaction): refuse a target with no usable centre