From d6a3cd08eadfec5021aacfc7639fad7d02fe89f9 Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 3 Jul 2024 12:26:45 +0200 Subject: [PATCH] fix(test): tab-navigating away from the test words doesnt fade in the ui --- frontend/src/ts/controllers/input-controller.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/ts/controllers/input-controller.ts b/frontend/src/ts/controllers/input-controller.ts index 30eb23c76..7ed39bf96 100644 --- a/frontend/src/ts/controllers/input-controller.ts +++ b/frontend/src/ts/controllers/input-controller.ts @@ -862,9 +862,11 @@ function handleTab(event: JQuery.KeyDownEvent, popupVisible: boolean): void { return; } - if (document.activeElement?.id !== "wordsInput") { - Focus.set(false); - } + setTimeout(() => { + if (document.activeElement?.id !== "wordsInput") { + Focus.set(false); + } + }, 0); } }