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

[HTML5] Fix input not focusing canvas, Gamepad API errors. #55111

Merged
merged 2 commits into from
Nov 19, 2021

Conversation

Faless
Copy link
Collaborator

@Faless Faless commented Nov 19, 2021

In this PR:

  • mousedown and touchstart should focus the canvas to ensure correct application lifecycle.
  • Add checks to Gamepad API events.
    In some conditions the events might be generated even when the gamepad object is not accessible due to Security Context requirements.

Fixes #55017.

mousedown and touchstart should focus the canvas to ensure correct
application lifecycle.
In some conditions the events might be generated even when the `gamepad`
object is not accessible due to Security Context requirements.
This commit adds a check to avoid firing the handler in those cases.
@Faless Faless added this to the 4.0 milestone Nov 19, 2021
@Faless Faless requested a review from a team as a code owner November 19, 2021 03:10
@Faless Faless added cherrypick:3.4 cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Nov 19, 2021
@akien-mga akien-mga merged commit 6357412 into godotengine:master Nov 19, 2021
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.5.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Nov 20, 2021
@akien-mga
Copy link
Member

Cherry-picked for 3.4.1.

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

Successfully merging this pull request may close these issues.

HTML5 exported game in iframe loses keyboard input after unfocus and attempt to refocus
2 participants