From 3f749c6540650c634974a88048af4aa0657dc4e8 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Wed, 12 Feb 2020 05:21:08 +0900
Subject: [PATCH] =?UTF-8?q?=E8=89=AF=E3=81=84=E6=84=9F=E3=81=98=E3=81=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/client/router.ts | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/client/router.ts b/src/client/router.ts
index 0f80e736e1..a8b74b2eaf 100644
--- a/src/client/router.ts
+++ b/src/client/router.ts
@@ -62,11 +62,16 @@ export const router = new VueRouter({
 	],
 	// なんかHacky
 	// 通常の使い方をすると scroll メソッドの behavior を設定できないため、自前で window.scroll するようにする
-	// setTimeout しないと、アニメーション(トランジション)の関係でうまく動かない
 	scrollBehavior(to) {
 		window._scroll = () => { // さらにHacky
 			if (to.name === 'index') {
 				window.scroll({ top: indexScrollPos, behavior: 'instant' });
+				const i = setInterval(() => {
+					window.scroll({ top: indexScrollPos, behavior: 'instant' });
+				}, 10);
+				setTimeout(() => {
+					clearInterval(i);
+				}, 500);
 			} else {
 				window.scroll({ top: 0, behavior: 'instant' });
 			}