mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-18 19:45:58 +08:00
Add scrolling to top after test restarts (#2220) by Ferotiq
* Add scrolling to top after test restarts * small changes scrolling only when the previous element has finished fading out checking if current scrollY is greater than 0 Co-authored-by: Jack <bartnikjack@gmail.com>
This commit is contained in:
parent
9329da7862
commit
6bafb574ca
1 changed files with 1 additions and 0 deletions
|
@ -594,6 +594,7 @@ 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);
|
||||
|
|
Loading…
Add table
Reference in a new issue