cleaned up the animations when not using quick tab and show out of focus warning is enabled. also closes #2206

This commit is contained in:
Miodec 2021-12-28 21:26:17 +01:00
parent 9d64233a5c
commit 76664fc7ae
2 changed files with 3 additions and 2 deletions

View file

@ -667,7 +667,7 @@ $(document).keydown((event) => {
!TestUI.resultVisible &&
(wordsFocused || event.key !== "Enter");
if (allowTyping && !wordsFocused && !$("#restartTestButton").is(":focus")) {
if (allowTyping && !wordsFocused && event.key !== "Enter") {
TestUI.focusWords();
if (Config.showOutOfFocusWarning) {
event.preventDefault();

View file

@ -555,7 +555,7 @@ export function restart(
setBailout(false);
PaceCaret.reset();
$("#showWordHistoryButton").removeClass("loaded");
TestUI.focusWords();
$("#restartTestButton").blur();
Funbox.resetMemoryTimer();
RateQuotePopup.clearQuoteStats();
$("#wordsInput").val(" ");
@ -589,6 +589,7 @@ export function restart(
},
125,
async () => {
TestUI.focusWords();
$("#monkey .fast").stop(true, true).css("opacity", 0);
$("#monkey").stop(true, true).css({ animationDuration: "0s" });
$("#typingTest").css("opacity", 0).removeClass("hidden");