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

It is unclear if the algorithm for gamepadconnected event matches implementations #215

Open
smaug---- opened this issue Sep 27, 2024 · 1 comment

Comments

@smaug----
Copy link

https://w3c.github.io/gamepad/#event-gamepadconnected doesn't seem to check for example if the window is in background tab.
At least some implementations require foreground window.

@nondebug
Copy link
Collaborator

Allowing gamepad access from non-foreground windows is intentional, but perhaps we should check that the page is visible? The Chromium implementation requires visibility before events are dispatched.

On some platforms the system APIs we use to access gamepad inputs have focus requirements that prevent background access. Chromium uses a variety of APIs to access gamepads so sometimes this behavior can differ between different gamepads on the same system.

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

2 participants