summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-02-07 16:08:45 +0100
committerAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-02-07 16:08:45 +0100
commit591b533cd20f7ea3d59b2ffc5484b48382c62106 (patch)
tree97a5e81a1a3ddd34454848ed18babf30219ab5a7
parentRevert "enter key at login" (diff)
downloadbeziapp-591b533cd20f7ea3d59b2ffc5484b48382c62106.tar
beziapp-591b533cd20f7ea3d59b2ffc5484b48382c62106.tar.gz
beziapp-591b533cd20f7ea3d59b2ffc5484b48382c62106.tar.bz2
beziapp-591b533cd20f7ea3d59b2ffc5484b48382c62106.tar.lz
beziapp-591b533cd20f7ea3d59b2ffc5484b48382c62106.tar.xz
beziapp-591b533cd20f7ea3d59b2ffc5484b48382c62106.tar.zst
beziapp-591b533cd20f7ea3d59b2ffc5484b48382c62106.zip
Diffstat (limited to '')
-rw-r--r--js/login.js10
-rw-r--r--login.html2
2 files changed, 10 insertions, 2 deletions
diff --git a/js/login.js b/js/login.js
index a7ab25c..564214f 100644
--- a/js/login.js
+++ b/js/login.js
@@ -10,6 +10,14 @@ function setupEventListeners() {
$("#login-button").click(function () {
login();
});
+ window.addEventListener("keyup", function(event) {
+ // Number 13 is the "Enter" key on the keyboard
+ if (event.keyCode === 13) {
+ // Cancel the default action, if needed
+ event.preventDefault();
+ login();
+ }
+});
}
// Handle login button click
@@ -58,4 +66,4 @@ function login() {
}
})
-} \ No newline at end of file
+}
diff --git a/login.html b/login.html
index b43949d..a25a519 100644
--- a/login.html
+++ b/login.html
@@ -59,4 +59,4 @@
</div>
</body>
-</html> \ No newline at end of file
+</html>