​​React​dialog,History API,Playwright,TypeScript,モーダル

Thumbnail of post image 033

写真の拡大表示などのモーダルを開いたまま、ブラウザの「戻る」を押すと、ページごと前の画面へ移ってしまいます。開くときに pushState で履歴を1つ積み、popstate で閉じるフックの書き方と、閉じるボタンやダブルクリックで履 ...