-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Key inputs are randomly lost and non-responsive in web export when hosted in an iframe #55248
Comments
OK, so I can confirm how to reliably reproduce the issue (at least on chrome). When the game is hosted in an iframe, if you click outside the canvas/iframe, then click back in, keyboard inputs will cease. |
I think this is probably related to this removal: b7ac3c1#diff-44731e0168fe89a03ed7f77c76c86beaf84fdcb1097c763e7f4eee3a8c540cf8L371-L373 If I'm reading that correctly, previously we were explicitly focusing the canvas (for iframe) on every mouse button event? |
cc @Faless |
I can confirm that the removal of this b7ac3c1#diff-44731e0168fe89a03ed7f77c76c86beaf84fdcb1097c763e7f4eee3a8c540cf8L371-L373 was the regression. Putting this back in fixed our issues. It now again re-focusses the canvas on mouse event in an iframe. |
Godot version
3.4
System information
Firefox + Chrome, all OSs
Issue description
We host our web builds on various web portal sites. We experience (seemingly random) times where keyboard inputs from the
<canvas>
are not passed through to godot engine. All keyboard input is just lost, even though the game's canvas is still in focus. Mouse cursor and click events are fine, it is just related to keyboard input.Steps to reproduce
This is incredibly hard to reproduce, as it is quite random, and requires a lot of setup... But export a 3.4 project to web, and host exported game within an iframe of another site.
This issue has only come up after upgraded to v 3.4, it seems this issue could be somewhat related to the refactor of js input here: b7ac3c1
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: