fix(style): weird shifting behavior when typing test that is only one line

This commit is contained in:
Miodec 2024-06-03 18:02:24 +02:00
parent 2890dc7db1
commit 85007b7412
2 changed files with 6 additions and 11 deletions

View file

@ -479,6 +479,7 @@
z-index: -1;
cursor: default;
pointer-events: none;
border-radius: 0;
}
#capsWarning {

View file

@ -405,23 +405,17 @@ export function updateWordsInputPosition(initial = false): void {
initial &&
!posUpdateLangList.some((l) => Config.language.startsWith(l))
) {
el.style.left = "0px";
el.style.left = activeWord.offsetLeft + "px";
el.style.top =
// wordsWrapperTop +
activeWord.offsetHeight * 2 +
activeWordMargin * 1.5 +
activeWord.offsetTop +
activeWord.offsetHeight +
-el.offsetHeight +
(activeWord.offsetHeight + activeWordMargin) +
"px";
} else {
el.style.left = activeWord.offsetLeft + "px";
el.style.top =
activeWord.offsetTop -
activeWordMargin +
// wordsWrapperTop +
activeWord.offsetHeight +
activeWordMargin +
-el.offsetHeight +
"px";
activeWord.offsetTop + activeWord.offsetHeight + -el.offsetHeight + "px";
}
}