(もっといい方法があれば教えて下さい!!🙇) 概要 Nuxt.jsプロジェクトで、外部ページに遷移してブラウザバックをしたところ、 画面最上部に戻されてしまったので対策。 結論 ホームディレクトリにapp/router.scrollBehavior.jsを追加し、下記のコードを実装 if (process.client) { if ('scrollRestoration' in window.history) { window.addEventListener('load', () => { window.history.scrollRestoration = 'auto' }) } } 理由 スクロール位置の復元設定が既存のrouter.scrollBehavior.jsで実装されているが、 iosだとbeforeunloadが発火しない。 なので、window.history.scr