mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-09 17:04:30 +08:00
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:
parent
9d64233a5c
commit
76664fc7ae
2 changed files with 3 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue