mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-11-10 17:04:49 +08:00
fix(caret): underline caret too low
This commit is contained in:
parent
01aefa91b4
commit
91c30cd889
1 changed files with 5 additions and 1 deletions
|
@ -112,7 +112,11 @@ export async function updatePosition(noAnim = false): Promise<void> {
|
|||
|
||||
const diff = letterHeight - caret.offsetHeight;
|
||||
|
||||
const newTop = letterPosTop + diff / 2;
|
||||
let newTop = letterPosTop + diff / 2;
|
||||
|
||||
if (Config.caretStyle === "underline") {
|
||||
newTop = letterPosTop - caret.offsetHeight / 2;
|
||||
}
|
||||
|
||||
let newLeft = letterPosLeft - (fullWidthCaret ? 0 : caretWidth / 2);
|
||||
|
||||
|
|
Loading…
Reference in a new issue