[Bug reported] Arrow Keys on HTML embedded game still moving the whole page

Hi Bouh, this is a follow up to a similar post I made a few months ago with the same title. I posted this update as a reply there, but I am not sure if you saw it.

I’d like to report that I’ve tried a simple test using b110 with an iframe. For some reason, the arrow keys still move the whole page even though the click focus is on the iframe.

I previously used your intermediate fix from PR #2589 that targets all keyboard keys with “preventDefault()” and it works. But the current runtimegame-pixi-renderer.js output by b110 has changed and gives the current behavior.

Thank you for your attention.

Oh, I thought replying directly to the person’s subpost automatically does a notification. Thank you for letting me know about this function.

1 Like

Hi @Bouh, I apologize for bumping this post, but I just downloaded beta 112 and the arrow keys in a HTML iframe issue is still present as reported above for beta 110.

Thank you for your attention.

In addition, what I’ve noticed is that Space is working. When you click within the iFrame, pressing Space will not move the page. And when you click outside the iFrame, it does.

So could it be that the exceptions rule for the arrow keys at the top of the runtimegame-pixi-renderer.js is giving the reverse effect where all keyboard keys are focused to the iFrame except for the arrow keys?

Not in Firefox.
@Bouh Is it possible to fix?

My previous fix was working for a browser but not for others, it wasn’t a good solution.
It better to report as a bug on Github.
I’ve reduced my code contribution, instead i’ll be focused on the community and the communication around GDevelop.

OK, thank you @Bouh for your help so far. I have submitted it as a bug on Github.