From 9714ac95c59de80f2592cf91768c5e5bb10faeb7 Mon Sep 17 00:00:00 2001 From: Miodec Date: Mon, 6 May 2024 13:35:43 +0200 Subject: [PATCH] fix: enter not working as space in 58008 funbox if quick restart was set to enter --- frontend/src/ts/controllers/input-controller.ts | 10 +++------- frontend/src/ts/elements/modes-notice.ts | 5 ++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/frontend/src/ts/controllers/input-controller.ts b/frontend/src/ts/controllers/input-controller.ts index 3d4e71b4b..d1c0666c6 100644 --- a/frontend/src/ts/controllers/input-controller.ts +++ b/frontend/src/ts/controllers/input-controller.ts @@ -974,8 +974,9 @@ $(document).on("keydown", async (event) => { if (Config.mode === "zen") { //do nothing } else if ( - !TestWords.hasNewline || - (TestWords.hasNewline && event.shiftKey) + (!TestWords.hasNewline && !Config.funbox.includes("58008")) || + ((TestWords.hasNewline || Config.funbox.includes("58008")) && + event.shiftKey) ) { // in case we are in a long test, setting manual restart if (event.shiftKey) { @@ -988,11 +989,6 @@ $(document).on("keydown", async (event) => { TestLogic.restart({ event, }); - } else { - setWordsInput(" " + TestInput.input.current); - if (Config.tapeMode !== "off") { - TestUI.scrollTape(); - } } } diff --git a/frontend/src/ts/elements/modes-notice.ts b/frontend/src/ts/elements/modes-notice.ts index 1e5a56f4b..06aeccca0 100644 --- a/frontend/src/ts/elements/modes-notice.ts +++ b/frontend/src/ts/elements/modes-notice.ts @@ -62,7 +62,10 @@ export async function update(): Promise { } } - if (TestWords.hasNewline && Config.quickRestart === "enter") { + if ( + (TestWords.hasNewline || Config.funbox.includes("58008")) && + Config.quickRestart === "enter" + ) { $(".pageTest #testModesNotice").append( `
shift + enter to restart
` );