Added a thing to listen for enter key-presses in client key input.

This commit is contained in:
Andrew Lalis 2024-10-15 13:53:34 -04:00
parent 6c7688e80a
commit 91e7f7efed
1 changed files with 7 additions and 0 deletions

View File

@ -176,6 +176,13 @@
refreshServers(); refreshServers();
window.setInterval(refreshServers, 3000); window.setInterval(refreshServers, 3000);
// Add a key listener to the dialog's password field, so pressing ENTER submits the form.
const keyInput = document.getElementById("client-key-input");
keyInput.addEventListener("keydown", (ev) => {
if (ev.code === "Enter") {
submitServerRequest();
}
})
</script> </script>
</body> </body>