fix(caret): block width going down to 0 when typing with blind mode on

This commit is contained in:
Miodec 2024-07-24 11:26:48 +02:00
parent 799902949b
commit 8d9875f4eb

View file

@ -130,8 +130,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;