aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpacien2024-01-05 00:30:12 +0100
committerpacien2024-01-05 00:30:12 +0100
commitc97536bf080a1c45634a91cee80dba3bad3c641c (patch)
tree12c29726c180639817c7a53ed313162fd482141c
parentd28df77dac1bcb96c90e25ad2ea2c210e8b8294c (diff)
downloadechoclip-c97536bf080a1c45634a91cee80dba3bad3c641c.tar.gz
fix scrolling on space hold
-rw-r--r--app.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app.js b/app.js
index 19d0867..f567987 100644
--- a/app.js
+++ b/app.js
@@ -53,9 +53,10 @@ function onGetDeviceSuccess(stream) {
53 }); 53 });
54 54
55 document.addEventListener("keydown", event => { 55 document.addEventListener("keydown", event => {
56 if (mediaRecorder.state == "inactive" && event.key == " ") { 56 if (event.key == " ") {
57 event.preventDefault(); // prevent scroll 57 event.preventDefault(); // prevent scroll
58 mediaRecorder.start(); 58 if (mediaRecorder.state == "inactive")
59 mediaRecorder.start();
59 } 60 }
60 }); 61 });
61 62