mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 07:16:17 +08:00
placing the words input in the center
This commit is contained in:
parent
07ab45d167
commit
f4dd3799d3
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue