placing the words input in the center

This commit is contained in:
Miodec 2023-03-07 18:54:57 +01:00
parent 07ab45d167
commit f4dd3799d3

View file

@ -207,7 +207,8 @@ function updateWordsInputPosition(force = false): void {
) as HTMLElement | null;
if (!shouldUpdate || !activeWord) {
el.style.top = "0px";
const wordsWrapper = document.querySelector("#wordsWrapper") as HTMLElement;
el.style.top = wordsWrapper.offsetHeight / 2 + "px";
el.style.left = "0px";
return;
}