Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work in iframe #234

Open
thenickman100 opened this issue Feb 23, 2025 · 1 comment
Open

Does not work in iframe #234

thenickman100 opened this issue Feb 23, 2025 · 1 comment

Comments

@thenickman100
Copy link

thenickman100 commented Feb 23, 2025

If the game is embedded in an iframe, keyboard events will not be detected. This limits the game to be mouse-only.
Based on this source: https://alula.github.io/SpaceCadetPinball

@thenickman100
Copy link
Author

As a temporary solution, this can be added to the parent page

window.onload = function() {
    document.getElementById("iframe-container").contentWindow.focus();
};

Ideally, there would be an edit the game's github code to not require this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant