From cd1697bfc5b57a043641f5d2204b3ffef58eb6b1 Mon Sep 17 00:00:00 2001 From: Miodec Date: Fri, 6 Aug 2021 14:25:25 +0100 Subject: [PATCH] stopping quick restart from working on long tests --- src/js/input-controller.js | 6 +++++- src/js/test/test-ui.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/js/input-controller.js b/src/js/input-controller.js index 5b25106bb..fefb9cde5 100644 --- a/src/js/input-controller.js +++ b/src/js/input-controller.js @@ -69,7 +69,11 @@ function handleTab(event) { ) { //ignore } else { - if (event.shiftKey) ManualRestart.set(); + if (event.shiftKey) { + ManualRestart.set(); + } else { + ManualRestart.reset(); + } event.preventDefault(); if ( TestLogic.active && diff --git a/src/js/test/test-ui.js b/src/js/test/test-ui.js index c8d17d18e..c14ca1a10 100644 --- a/src/js/test/test-ui.js +++ b/src/js/test/test-ui.js @@ -989,6 +989,7 @@ $("#wordsInput").on("focusout", () => { $(document).on("keypress", "#restartTestButton", (event) => { if (event.keyCode == 13) { + ManualRestart.reset(); if ( TestLogic.active && Config.repeatQuotes === "typing" &&