diff --git a/frontend/src/ts/test/practise-words.ts b/frontend/src/ts/test/practise-words.ts index 692a94fa4..c371af37b 100644 --- a/frontend/src/ts/test/practise-words.ts +++ b/frontend/src/ts/test/practise-words.ts @@ -140,7 +140,7 @@ export function resetBefore(): void { before.customText = null; } -export function showPopup(focus = false): void { +export function showPopup(): void { if (Config.mode === "zen") { Notifications.add("Practice words is unsupported in zen mode", 0); return; @@ -152,10 +152,7 @@ export function showPopup(focus = false): void { .css("opacity", 0) .removeClass("hidden") .animate({ opacity: 1 }, 100, () => { - if (focus) { - console.log("focusing"); - $("#practiseWordsPopup .missed").trigger("focus"); - } + $(`#${wrapperId}`).trigger("focus"); }); } } @@ -190,11 +187,6 @@ $("#practiseWordsPopupWrapper .button").on("keypress", (e) => { } }); -$("#practiseWordsPopupWrapper .button.both").on("focusout", (e) => { - e.preventDefault(); - $("#practiseWordsPopup .missed").trigger("focus"); -}); - $(document).on("keydown", (event) => { if (event.key === "Escape" && isPopupVisible(wrapperId)) { hidePopup(); diff --git a/frontend/static/html/popups.html b/frontend/static/html/popups.html index 9fc9bd73d..b3e00ee0c 100644 --- a/frontend/static/html/popups.html +++ b/frontend/static/html/popups.html @@ -264,7 +264,7 @@ -