reactjs / reactjs/react.dev

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

Open
#7,176 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug: unconfirmed
Dominant language
JavaScript
Stars
11.8k
Forks
7.9k
Avg merge
1d 11h
Merged PRs (30d)
11

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in Chrome on an iPhone using the linked React documentation page and URLs with named anchors. Trace the mobile search and link-navigation behavior around those anchors; done means search opens reliably, links navigate normally, and repeated attempts no longer freeze the tab.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation, frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.