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

useFocus does not seem to work in the iOS simulator (tested with VoiceOver)

未关闭
#100 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
react-native, typescript

调研方向

从 lib/hooks/useFocus.ts 开始,在启用 VoiceOver 的 iOS 模拟器中,使用链接的示例仓库或文档中的 useFocus 示例复现报告的行为。将模拟器中的结果与实体 iPhone 进行比较,然后确定重复的 AccessibilityInfo.setAccessibilityFocus 调用或模拟器行为是否解释了该问题;确认了原因并就修复方案或文档澄清达成一致后,即视为完成。

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

描述

Sample git repo
Snack that doesn't work because it can't install react-native-ama but it is the example from the docs.

I have tried to use useFocus on two different projects (and machines), and neither work with the IOS simulator. I built a further third project and was able to run it on my personal iPhone with voiceover and it seemed to work. It does seem to work on a physical device fine.

Is there anything that can be done about this for those of us who use the IOS simulator as their primary development device?

I even copy/pasted the useFocus code and tried it as a standalone hook since it doesn't rely on anything from the <AMAProvider>. Same thing.

Any help would be appreciated.
Thank you!

Additional question:
Why is AccessibilityInfo.setAccessibilityFocus(elementId); ran twice in useFocus?

主要语言
TypeScript
星标
295
派生
22
PR 合并指标
30 天内没有已合并 PR

环境准备

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

从这里开始

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

FormidableLabs/react-native-ama 的其他 Issue

查看 FormidableLabs/react-native-ama 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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