summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/login.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/js/login.js b/js/login.js
index a7ab25c..f6c8c3f 100644
--- a/js/login.js
+++ b/js/login.js
@@ -10,6 +10,14 @@ function setupEventListeners() {
$("#login-button").click(function () {
login();
});
+ // če kliknemo enter, klikni gumb
+ window.addEventListener("keyup", function(event) {
+ // Number 13 is the "Enter" key on the keyboard
+ if (event.keyCode === 13) {
+ event.preventDefault();
+ document.getElementById("login-button").click();
+ }
+ });
}
// Handle login button click
@@ -58,4 +66,4 @@ function login() {
}
})
-} \ No newline at end of file
+}