diff --git a/PongGame/wwwroot/js/pong.js b/PongGame/wwwroot/js/pong.js index 216e903..c8f387a 100644 --- a/PongGame/wwwroot/js/pong.js +++ b/PongGame/wwwroot/js/pong.js @@ -186,7 +186,7 @@ const keyEvent = (function () { } if (event.repeat) return; - if (event.path.indexOf(document.body) != 0) return; // only use key if it was pressed on empty space + if (event.target.tagName == 'INPUT') return; // dont use key if on input event.preventDefault(); moveUpdated();