summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-02-07 15:59:05 +0100
committerAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-02-07 15:59:05 +0100
commita97c0314db49f0d446b5568a3156f61d04980f42 (patch)
treeb3d9a3ff0da8c239399ca89c15f7597de8d05896
parentMerge pull request #8 from beziapp/dev (diff)
downloadbeziapp-a97c0314db49f0d446b5568a3156f61d04980f42.tar
beziapp-a97c0314db49f0d446b5568a3156f61d04980f42.tar.gz
beziapp-a97c0314db49f0d446b5568a3156f61d04980f42.tar.bz2
beziapp-a97c0314db49f0d446b5568a3156f61d04980f42.tar.lz
beziapp-a97c0314db49f0d446b5568a3156f61d04980f42.tar.xz
beziapp-a97c0314db49f0d446b5568a3156f61d04980f42.tar.zst
beziapp-a97c0314db49f0d446b5568a3156f61d04980f42.zip
-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
+}