mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-26 00:25:43 +08:00
fixed a bug where the caret would reset position after loosing focus or opening the command line. fixes #1105
This commit is contained in:
parent
816c246481
commit
cc17338d58
2 changed files with 3 additions and 3 deletions
|
@ -4139,7 +4139,7 @@ $("#wordsInput").on("focus", () => {
|
|||
if (!TestUI.resultVisible && Config.showOutOfFocusWarning) {
|
||||
OutOfFocus.hide();
|
||||
}
|
||||
Caret.show();
|
||||
Caret.show(currentInput);
|
||||
});
|
||||
|
||||
$("#wordsInput").on("focusout", () => {
|
||||
|
|
|
@ -27,9 +27,9 @@ export function hide() {
|
|||
$("#caret").addClass("hidden");
|
||||
}
|
||||
|
||||
export function show() {
|
||||
export function show(currentInput) {
|
||||
if ($("#result").hasClass("hidden")) {
|
||||
updatePosition("");
|
||||
updatePosition(currentInput);
|
||||
$("#caret").removeClass("hidden");
|
||||
startAnimation();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue