We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ff91923 + 8dc6dc1 commit 79ae294Copy full SHA for 79ae294
script.js
@@ -56,15 +56,22 @@ app.addEventListener("keydown", async function (event) {
56
}
57
if (event.key === "ArrowUp") {
58
if (count > 0) {
59
+ await delay(0.005);
60
const input = document.querySelector("input");
61
input.value = history[--count];
62
+ const end = input.value.length;
63
+ input.setSelectionRange(end, end);
64
65
66
if (event.key === "ArrowDown") {
67
if (count < history.length - 1) {
68
69
input.value = history[++count];
70
} else {
71
+
72
+ if (count === history.length - 1){
73
+ count++;
74
+ }
75
76
input.value = "";
77
0 commit comments