reactjs / reactjs/react.dev

[Bug]: Browser back button not working properly when navigating from /learn to main page

オープン
#8,021 コメント 5 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug: unconfirmed
主要言語
JavaScript
スター
11.8k
フォーク
7.9k
平均マージ
1日 11時間
マージ済み PR(30日)
11

説明

Summary

Problem: When navigating from http://localhost:3000/learn to a specific learning page (like Quick Start), clicking the browser's back button does not return to the main page at http://localhost:3000/ .

Steps to Reproduce:

  1. Go to http://localhost:3000/learn
  2. Click on "Quick Start" (or any other learning section)
  3. Click the browser's back button
  4. Expected: Should return to http://localhost:3000/
  5. Actual: Does not navigate back to main page

Browser: Chrome

Page

http://localhost:3000/learn

Details

Additional Context: This appears to be a navigation history issue where the browser's back button functionality is not working as expected when moving between the main page and learning sections. The issue might be related to how Next.js handles client-side routing in the learning section.

Possible Related Issues:

  • Similar to the fragment link back button issue that was recently fixed
  • May involve scroll restoration or navigation state management

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、Chrome で /learn から Quick Start に進み、メインページに戻るフローを再現します。次に、学習セクションの Next.js によるクライアントサイドルーティングを調べ、最近修正されたフラグメントリンクのナビゲーションと比較します。ブラウザーの戻るボタンで、期待どおり学習ページから http://localhost:3000/ に戻れることが完了の条件です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, next.js
領域
frontend, web-dev
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。