Prevent space from scrolling

This commit is contained in:
2017-09-09 14:38:03 +02:00
committed by MightyPork
parent 2d22d5cff1
commit 0f9809c290
+2
View File
@@ -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);
}
});