[Bug]: URI Text Fragments do not work with "Deep Dive" text blocks
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 11.8k
- Forks
- 7.9k
- Ø Merge
- 1 T. 11 Std.
- Gemergte PRs (30 T.)
- 11
Beschreibung
Summary
Clicking a doc link that includes a Text Fragment does not scroll nor highlight the relevant text, if that text happens to be inside a "Deep Dive" section.
Page
Details
When attempting to quote a part of the doc that is under a "Deep Dive" section, with a URI text fragment: clicking the link will open the documentation page in the browser, but without scrolling to the relevant block nor highlighting the quoted part of the documentation.
However, there are two cases the highlighting works. Both of those require the page to already be loaded, the fragment is added to the uri of the page:
- If the section is not opened beforehand: the browser still does not scrolls to the section nor open it, but the text is correctly highlighted.
- If the section is opened beforehand: the browser scrolls to the section and highlights the text as expected
Here's a video capture of the problem:
https://github.com/user-attachments/assets/989e0a8c-2729-4072-aeca-ded2ac7d5c72
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der verlinkten Seite react.dev/reference/react/useCallback und untersuche, wie der Abschnitt „Deep Dive“ während der initialen Navigation gerendert und geöffnet wird. Rufe die angegebene Textfragment-URL beim Laden einer neuen Seite auf und vergleiche sie damit, das Fragment nach dem Laden und Öffnen des Abschnitts hinzuzufügen. Fertig ist die Aufgabe, wenn der Browser bei der direkten Navigation zu Text innerhalb eines eingeklappten Abschnitts „Deep Dive“ scrollt und diesen hervorhebt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, react
- Bereich
- documentation, web-dev
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100