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

Update suggestion for Input Keyboard problem #34

Closed
Xeyos88 opened this issue Mar 7, 2024 · 3 comments
Closed

Update suggestion for Input Keyboard problem #34

Xeyos88 opened this issue Mar 7, 2024 · 3 comments

Comments

@Xeyos88
Copy link

Xeyos88 commented Mar 7, 2024

I wanted to suggest a small update.
Unity's canvas captures all the keyboard input that comes in. No longer being able to interact with the rest of the applioation.

To get around this problem in the Unity project you need to make a small change:
#if !UNITY_EDITOR && UNITY_WEBGL WebGLInput.captureAllKeyboardInput = false; #endif

This causes Unity to no longer capture all input once the focus is lost, however, you can no longer reassign it.

To solve this problem it is nesessary to add the tabindex attribute to the canvas.
Then the library should directly generate the canvas with the attribute
<canvas id="unity-canvas-1" style="width: 100%; height: 100%; cursor: default;" width="1689" height="356" tabindex="1"></canvas>

@Meqn
Copy link
Owner

Meqn commented Mar 12, 2024

Okay, I'll post a version later

@Meqn Meqn closed this as completed in f6ae7f0 Mar 12, 2024
@Xeyos88
Copy link
Author

Xeyos88 commented Mar 15, 2024

I updated to version 3.5.3 but the tabindex attribute still seems not to be generated in the canvas tag
image

@Meqn
Copy link
Owner

Meqn commented May 22, 2024

Sorry, I just saw your reply.
There is a bug in the previously released v3.5.3, the tabindex type can only accept number type. You can upgrade to version v3.5.5.

@Meqn Meqn reopened this May 22, 2024
@Meqn Meqn closed this as completed May 24, 2024
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