Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

已关闭
#3,841 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

已经有一个关联 PR 被合并了。

  • #3842 来自 @faresrafat3 —— 已关闭,未合并
  • #3934 来自 @airowe —— 已合并

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
20/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
typescript
领域
mobile, testing

调研方向

Start with packages/selectors/src/interaction-touch-point.ts and the existing interaction touch point tests in packages/selectors; the issue names this entry point but not a specific test file. Check how zero width or height is classified and use the existing typed reason for an unresolvable point. Add the requested regression test and command level case showing press refuses without dispatching a tap. An open linked pull request already covers this work.

由索引模型根据 Issue 内容生成。

描述

bug ready-for-agent

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.
主要语言
TypeScript
星标
5.1k
派生
339
平均合并
12 小时 22 分钟
30 天内合并 PR
701

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

callstack/agent-device 的其他 Issue

查看 callstack/agent-device 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。