From 861eee429ee0cb2442bdcd650f3138351d3e6a07 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 19 Oct 2020 17:20:17 +0100 Subject: [PATCH] disabled space scrolling --- public/js/script.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/js/script.js b/public/js/script.js index 20ef01353..75daf53ce 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -4973,6 +4973,13 @@ $(".pageTest #copyWordsListButton").click(async (event) => { } }); +//stop space scrolling +window.addEventListener('keydown', function(e) { + if(e.keyCode == 32 && e.target == document.body) { + e.preventDefault(); + } +}); + let ctx = $("#wpmChart"); let wpmOverTimeChart = new Chart(ctx, { type: "line",