Prevent space from scrolling

http-comm
cpsdqs 7 years ago committed by Ondřej Hruška
parent 2d22d5cff1
commit 0f9809c290
  1. 2
      html_orig/jssrc/term_input.js

@ -142,6 +142,8 @@ var Input = (function() {
else if (evt.which) str = String.fromCodePoint(evt.which); else if (evt.which) str = String.fromCodePoint(evt.which);
if (str.length>0 && str.charCodeAt(0) >= 32) { if (str.length>0 && str.charCodeAt(0) >= 32) {
// console.log("Typed ", str); // console.log("Typed ", str);
// prevent space from scrolling
if (e.which === 32) e.preventDefault();
sendStrMsg(str); sendStrMsg(str);
} }
}); });

Loading…
Cancel
Save