From a3e3de47f5db1b3f562680d8f9e7c440ad932fdf Mon Sep 17 00:00:00 2001 From: Miodec Date: Tue, 19 Nov 2024 17:49:48 +0100 Subject: fix: home and end keys not ignored during test, causing desync closes #6053 --- frontend/src/ts/constants/ignored-keys.ts | 2 ++ frontend/src/ts/controllers/input-controller.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/frontend/src/ts/constants/ignored-keys.ts b/frontend/src/ts/constants/ignored-keys.ts index 40680705c..8ee3e9bbc 100644 --- a/frontend/src/ts/constants/ignored-keys.ts +++ b/frontend/src/ts/constants/ignored-keys.ts @@ -5,4 +5,6 @@ export const IgnoredKeys = [ "AudioVolumeUp", "AudioVolumeDown", "AudioVolumeMute", + "Home", + "End", ]; diff --git a/frontend/src/ts/controllers/input-controller.ts b/frontend/src/ts/controllers/input-controller.ts index 5acdae853..d28b4281a 100644 --- a/frontend/src/ts/controllers/input-controller.ts +++ b/frontend/src/ts/controllers/input-controller.ts @@ -904,6 +904,7 @@ $(document).on("keydown", async (event) => { console.debug( `Key ${event.key} is on the list of ignored keys. Stopping keydown event.` ); + event.preventDefault(); return; } -- cgit v1.2.3