moved focuswords to do dom-util

This commit is contained in:
Miodec 2021-03-15 18:51:04 +00:00
parent e9dd9bedb9
commit 44bb61c734
3 changed files with 7 additions and 6 deletions

View file

@ -236,3 +236,9 @@ export function updateTestModesNotice(
);
}
}
function focusWords() {
if (!$("#wordsWrapper").hasClass("hidden")) {
$("#wordsInput").focus();
}
}

View file

@ -15,6 +15,7 @@ import {
swapElements,
accountIconLoading,
updateTestModesNotice,
focusWords,
} from "./dom-util";
import * as Misc from "./misc";
import * as CloudFunctions from "./cloud-functions";

View file

@ -2885,12 +2885,6 @@ function restartTest(withSameWordset = false, nosave = false, event) {
);
}
function focusWords() {
if (!$("#wordsWrapper").hasClass("hidden")) {
$("#wordsInput").focus();
}
}
function changePage(page) {
if (pageTransition) {
return;