diff --git a/src/js/test/practise-words.js b/src/js/test/practise-words.js index fe7d21ad5..004e2dd25 100644 --- a/src/js/test/practise-words.js +++ b/src/js/test/practise-words.js @@ -90,13 +90,18 @@ export function resetBefore() { before.numbers = null; } -export function showPopup() { +export function showPopup(focus = false) { if ($("#practiseWordsPopupWrapper").hasClass("hidden")) { $("#practiseWordsPopupWrapper") .stop(true, true) .css("opacity", 0) .removeClass("hidden") - .animate({ opacity: 1 }, 100); + .animate({ opacity: 1 }, 100, () => { + if (focus) { + console.log("focusing"); + $("#practiseWordsPopup .missed").focus(); + } + }); } } diff --git a/src/js/test/test-ui.js b/src/js/test/test-ui.js index a4c68f817..2b1ef4b5b 100644 --- a/src/js/test/test-ui.js +++ b/src/js/test/test-ui.js @@ -1005,10 +1005,9 @@ $(document.body).on("click", "#restartTestButton", () => { }); $(document).on("keypress", "#practiseWordsButton", (event) => { - // if (event.keyCode == 13) { - // PractiseWords.init(); - // } - PractiseWords.showPopup(); + if (event.keyCode == 13) { + PractiseWords.showPopup(true); + } }); $(document.body).on("click", "#practiseWordsButton", () => { diff --git a/src/sass/style.scss b/src/sass/style.scss index a658d4bcf..9e63bc419 100644 --- a/src/sass/style.scss +++ b/src/sass/style.scss @@ -3585,8 +3585,8 @@ key { outline: none; } &:focus { - color: var(--text-color); - background: rgba(0, 0, 0, 0.1); + color: var(--main-color); + background: var(--sub-color); outline: none; } diff --git a/static/index.html b/static/index.html index 1dec95bde..6b940601e 100644 --- a/static/index.html +++ b/static/index.html @@ -126,9 +126,9 @@ more often or words that you typed much slower will be weighted higher and appear more often. -
Practice missed
-
Practice slow
-
Practice both
+
Practice missed
+
Practice slow
+
Practice both