I have embedded my web game, but when the user presses the spacebar, the entire page scrolls. The alt key also doesn't not prevent default properly.
I have this on my game:
document.addEventListener('keyup', e => { e.preventDefault(); e.stopPropagation(); e.stopImmediatePropagation(); handleInput(e); return false; });
But it does nothing and the page still scrolls down. Please to help.