Skip to content

Commit 2632f12

Browse files
Update discover.js
Signed-off-by: Lissan <150966211+DataForSolution@users.noreply.github.com>
1 parent d917956 commit 2632f12

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

assets/js/discover.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,19 @@ document.addEventListener("DOMContentLoaded", async () => {
7575

7676
}
7777

78-
button.addEventListener("click", searchPlatform);
78+
button.addEventListener("click", searchPlatform);
7979

80-
input.addEventListener("keyup", event => {
80+
input.addEventListener("input", searchPlatform);
8181

82-
if (event.key === "Enter") {
82+
input.addEventListener("keydown", event => {
8383

84-
searchPlatform();
84+
if (event.key === "Escape") {
8585

86-
}
86+
input.value = "";
87+
results.innerHTML = "Start typing to explore the platform.";
88+
89+
}
8790

88-
});
91+
});
8992

9093
});

0 commit comments

Comments
 (0)