only scrolling on restart if on test page

This commit is contained in:
Miodec 2022-01-08 16:56:15 +01:00
parent 026300dd36
commit fd5e2e6dc9

View file

@ -557,7 +557,8 @@ export function restart(
$("#restartTestButton").blur();
Funbox.resetMemoryTimer();
RateQuotePopup.clearQuoteStats();
if (window.scrollY > 0) window.scrollTo({ top: 0, behavior: "smooth" });
if (UI.getActivePage() == "pageTest" && window.scrollY > 0)
window.scrollTo({ top: 0, behavior: "smooth" });
$("#wordsInput").val(" ");
TestUI.reset();