diff --git a/src/js/test/test-logic.js b/src/js/test/test-logic.js index cd9069fcc..004a03eea 100644 --- a/src/js/test/test-logic.js +++ b/src/js/test/test-logic.js @@ -558,6 +558,7 @@ export function restart( $("#restartTestButton").blur(); Funbox.resetMemoryTimer(); RateQuotePopup.clearQuoteStats(); + if (window.scrollY > 0) window.scrollTo({ top: 0, behavior: "smooth" }); $("#wordsInput").val(" "); TestUI.reset(); @@ -594,7 +595,6 @@ export function restart( $("#monkey").stop(true, true).css({ animationDuration: "0s" }); $("#typingTest").css("opacity", 0).removeClass("hidden"); $("#wordsInput").val(" "); - if(window.scrollY > 0) window.scrollTo({ top: 0, behavior: "smooth" }); if (!withSameWordset) { setRepeated(false); setPaceRepeat(repeatWithPace);