fix: zen mode not working

This commit is contained in:
Miodec 2024-07-11 10:50:48 +02:00
parent 966d3ce574
commit 1462d5193b
2 changed files with 5 additions and 5 deletions

View file

@ -116,8 +116,8 @@ export async function updatePosition(noAnim = false): Promise<void> {
);
const letterPosTop =
currentLetter?.offsetTop ||
previousLetter?.offsetTop ||
currentLetter?.offsetTop ??
previousLetter?.offsetTop ??
lastWordLetter?.offsetTop;
const letterHeight =
@ -127,8 +127,8 @@ export async function updatePosition(noAnim = false): Promise<void> {
Config.fontSize * Numbers.convertRemToPixels(1);
const letterWidth =
currentLetter?.offsetWidth ||
previousLetter?.offsetWidth ||
currentLetter?.offsetWidth ??
previousLetter?.offsetWidth ??
lastWordLetter?.offsetWidth;
const diff = letterHeight - caret.offsetHeight;

View file

@ -242,7 +242,7 @@ export function updateActiveElement(
}
if (Config.mode === "zen" && backspace) {
active?.remove();
} else if (active !== null) {
} else if (active !== null && !initial) {
active.classList.remove("active");
}
const activeWord =