diff --git a/src/js/script.js b/src/js/script.js index 927dfae67..4651cd08f 100644 --- a/src/js/script.js +++ b/src/js/script.js @@ -2767,8 +2767,6 @@ function startTest() { 100 ); - updateLiveAcc(acc); - if (activeFunBox === "layoutfluid" && config.mode === "time") { const layouts = ["qwerty", "dvorak", "colemak"]; let index = 0; @@ -4686,11 +4684,16 @@ $(document).keydown(function (event) { let modePopupVisible = !$("#customTextPopupWrapper").hasClass("hidden") || !$("#customMode2PopupWrapper").hasClass("hidden"); - if (pageTestActive && !commandLineVisible && !modePopupVisible) { - if (!wordsFocused && event.key !== "Enter") { - focusWords(); - if (config.showOutOfFocusWarning) return; - } + if ( + pageTestActive && + !commandLineVisible && + !modePopupVisible && + !resultVisible && + !wordsFocused && + event.key !== "Enter" + ) { + focusWords(); + if (config.showOutOfFocusWarning) return; } //tab @@ -4746,6 +4749,13 @@ $(document).keydown(function (event) { if (wordsFocused) { handleAlpha(event); } + + let acc = Misc.roundTo2( + (accuracyStats.correct / + (accuracyStats.correct + accuracyStats.incorrect)) * + 100 + ); + updateLiveAcc(acc); }); function handleTab(event) {