WebGL wrong behaviour on UP/DOWNkeys pressed

Hello,

I have uploaded WebGL project on my web server, but I have the following problem:

Player can navigate Left/Right But on pressing Up/Down Arrows whole page scrolling instead of player Jump.

Seems that on up/down scroll event WebGL do not handle while focused.

Demo :

https://smallheroes.site/small-heroes-play-online-platform-adventure-game

Please advice.

Try adding the following JavaScript code to the main .html page inside the tags:

window.addEventListener('keydown', function(e) { e.preventDefault(); });

More detailed solutions may be found here: javascript - Html - disable page scrolling with arrow keys with out toatlly disabling arrow keys - Stack Overflow