fixed a bug where the caret would reset position after loosing focus or opening the command line. fixes #1105

This commit is contained in:
Miodec 2021-03-16 01:51:04 +00:00
parent 816c246481
commit cc17338d58
2 changed files with 3 additions and 3 deletions

View file

@ -4139,7 +4139,7 @@ $("#wordsInput").on("focus", () => {
if (!TestUI.resultVisible && Config.showOutOfFocusWarning) {
OutOfFocus.hide();
}
Caret.show();
Caret.show(currentInput);
});
$("#wordsInput").on("focusout", () => {

View file

@ -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();
}