From 8d9875f4eb0084c971714d70f8af731b1e1a5eff Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 24 Jul 2024 11:26:48 +0200 Subject: [PATCH] fix(caret): block width going down to 0 when typing with blind mode on --- frontend/src/ts/test/caret.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/ts/test/caret.ts b/frontend/src/ts/test/caret.ts index 8a5126b42..a7dc6ddba 100644 --- a/frontend/src/ts/test/caret.ts +++ b/frontend/src/ts/test/caret.ts @@ -130,8 +130,8 @@ export async function updatePosition(noAnim = false): Promise { Config.fontSize * Numbers.convertRemToPixels(1); const letterWidth = - currentLetter?.offsetWidth ?? - previousLetter?.offsetWidth ?? + currentLetter?.offsetWidth || + previousLetter?.offsetWidth || lastWordLetter?.offsetWidth; const diff = letterHeight - caret.offsetHeight;