You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if any key is pressed and the tab is switched, Then the key remains pressed after coming back to the same tab if it's pressed up before coming to this tab.
Steps to reproduce:
1- Press any control Key e.g W/UP
2- Change Tab while keeping that key pressed.
3- After changing tab, press up that key and come back to the build (fps) tab.
The text was updated successfully, but these errors were encountered:
It is due to the way states is stored and updated in engine. When window looses focus, keyup event is not caught by the application, leading to "sticky" state.
Adding support of visibilitychange event, which would set all key states to false - will solve an issue.
yes, i read the engine code and it saves all the keys pressed in the object named " this._keymap". So if we somehow delete all the keys from this object on visibilitychange then we can solve this issue.
if any key is pressed and the tab is switched, Then the key remains pressed after coming back to the same tab if it's pressed up before coming to this tab.
The first person movement project has this same issue. Here is a link to the project :
https://playcanvas.com/editor/scene/440123
Steps to reproduce:
1- Press any control Key e.g W/UP
2- Change Tab while keeping that key pressed.
3- After changing tab, press up that key and come back to the build (fps) tab.
The text was updated successfully, but these errors were encountered: