mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-09 13:44:29 +08:00
fix(caret): incorrect placement on page load
This commit is contained in:
parent
b2a8604994
commit
595000ad4f
2 changed files with 4 additions and 2 deletions
|
|
@ -1642,7 +1642,7 @@ export function setFontSize(fontSize: number, nosave?: boolean): boolean {
|
|||
ConfigEvent.dispatch("fontSize", config.fontSize, nosave);
|
||||
|
||||
// trigger a resize event to update the layout - handled in ui.ts:108
|
||||
$(window).trigger("resize");
|
||||
if (!nosave) $(window).trigger("resize");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -356,7 +356,9 @@ export function showWords(): void {
|
|||
updateWordsWidth();
|
||||
updateWordsHeight(true);
|
||||
updateActiveElement(undefined, true);
|
||||
void Caret.updatePosition();
|
||||
setTimeout(() => {
|
||||
void Caret.updatePosition();
|
||||
}, 125);
|
||||
updateWordsInputPosition(true);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue