reactjs / reactjs/react.dev

[Bug]: State bug breaking search and eventually freezing up

未关闭
#7,176 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug: unconfirmed
主要语言
JavaScript
星标
11.8k
派生
7.9k
平均合并
1 天 11 小时
30 天内合并 PR
11

描述

Summary

I’m on chrome on my iPhone and search works sometimes, but then on certain URLs, like the one linked on this issue, tapping to search just makes the button appear to be held down with no other effect. Trying repeatedly can freeze up the tab.

Page

https://react.dev/reference/react/Component#static-getderivedstatefromerror

Details

If it’s failing to pull up the search UI, and I go and click a link to go somewhere else in the docs, it suddenly does open up search instead of navigating there. If I close it without actually searching, it does continue navigation to the link I tapped. Depending on the new url I’m on, it may then work normally, or this same behavior again. It appears as if it may be happening when the current url is pointing to a named anchor. It’s only happening to me on mobile - it works fine on desktop trying the exact same thing, on the same urls.

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先,使用链接的 React 文档页面和带有命名锚点的 URL,在 iPhone 上的 Chrome 中重现该问题。跟踪这些锚点附近的移动端搜索和链接导航行为;当搜索能够可靠打开、链接能够正常导航,并且重复尝试不再使标签页冻结时,即表示完成。

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

评估

技术栈
javascript, react
领域
documentation, frontend, web-dev
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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