I have been banging my head against this all afternoon. I was going to reply to the other threads on this but they are so old it wouldnt let me.
I went as far as to create a blank project with only a Square with "Tile Movement" behaviour & Default Controls enables (Arrow Keys).
The end result is no matter what I try, when the iFrame is in focus, the keyboard arrows control the browser's scrolling.
Check this URL: bluewizard.com/nate/_games/test.php
I tried adding some code:
window.addEventListener("keydown", function(e) {
// space and arrow keys
if([32, 37, 38, 39, 40].indexOf(e.keyCode) > -1) {
e.preventDefault();
}
}, false);
to preventDefault on the arrow keys both to the Parent page, and the iframe's index.html, but the best i can do seems to be that i can prevent scrolling on the main parent page. As soon as I click the iframe to control the square, the arrow keys go back to scrolling the page.
Clicking outside the iframe back on the arrow keys will prevent them from scrolling again.
Anyone have this solved already? I'd be so grateful for your advice / solution!