Hi, I’m wondering if anyone knows if there is a way to focus the keyboard arrow keys strictly on a game embedded in an iframe without affecting the webpage it is embedded in.
If the page currently has vertical or horizontal scrollbars (e.g. on a blog or Itch), the arrow keys also move the page accordingly. I notice that HTML games made with, say, Phaser or Construct, somehow allow the arrow keys to function just on the embedded game.
Can this be done by an event in GDevelop or some other condition?
Hi Bouh, I’d like to report that I’ve just tried a simple test using b110 with an iframe. For some reason, the arrow keys (and PageUp/PageDown keys) still move the whole page even though the click focus is on the iframe.
Your fix is definitely working for keys like Space. When I am focused on the iframe, pressing Space will not scroll the entire page. And when I click outside the iframe, it moves the page.
I previously used your intermediate fix from PR #2589 and it works. But the current runtimegame-pixi-renderer.js output by b110 gives the current partial behavior.