From 0f9809c2903589eea77f243460c1de144de189a3 Mon Sep 17 00:00:00 2001 From: cpsdqs Date: Sat, 9 Sep 2017 00:00:02 +0200 Subject: [PATCH] Prevent space from scrolling --- html_orig/jssrc/term_input.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/html_orig/jssrc/term_input.js b/html_orig/jssrc/term_input.js index 2d4277f..6df0535 100644 --- a/html_orig/jssrc/term_input.js +++ b/html_orig/jssrc/term_input.js @@ -142,6 +142,8 @@ var Input = (function() { else if (evt.which) str = String.fromCodePoint(evt.which); if (str.length>0 && str.charCodeAt(0) >= 32) { // console.log("Typed ", str); + // prevent space from scrolling + if (e.which === 32) e.preventDefault(); sendStrMsg(str); } });