From 1b58209b7030818985b28554f1e34834a2434307 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 14 Aug 2020 02:06:23 +0100 Subject: [PATCH] fixed master mode not showing last word when failed --- public/js/script.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/js/script.js b/public/js/script.js index 9cf44beeb..f6053106d 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -3383,6 +3383,8 @@ $(document).keypress(function (event) { if (config.stopOnError && !thisCharCorrect) { if (config.difficulty == "master") { //failed due to master diff when pressing a key + inputHistory.push(currentInput); + correctedHistory.push(currentCorrected); showResult(true); let testNow = Date.now(); let testSeconds = roundTo2((testNow - testStart) / 1000); @@ -3668,6 +3670,8 @@ $(document).keydown((event) => { if (config.stopOnError) { if (config.difficulty == "expert" || config.difficulty == "master") { //failed due to diff when pressing space + inputHistory.push(currentInput); + correctedHistory.push(currentCorrected); showResult(true); // if (!afkDetected) { let testNow = Date.now(); @@ -3704,6 +3708,8 @@ $(document).keydown((event) => { config.difficulty == "master" ) { //submitted last word incorrect and failed test + inputHistory.push(currentInput); + correctedHistory.push(currentCorrected); showResult(true); // if (!afkDetected) { let testNow = Date.now();