Setting "SetNuiFocusKeepInput" and Cursor in two UIs (first true -> second false) is not updated properly
What happened?
We are having two UIs that can be opened and interacted with at the same time.
First UI (Phone) is setting
SetNuiFocus(true, true); -> cursor is visible -> correct
SetNuiFocusKeepInput(true); -> game controls are working -> correct
The second UI (Interaction menu) now sets
SetNuiFocus(true, false); -> cursor is still visible -> not correct
SetNuiFocusKeepInput(false); -> game controls are still working -> not correct
Also IsNuiFocusKeepingInput() confirms this behavior and returns 1 (should be true instead btw.).
Currently I've implemented a workaround using SetPlayerControl(player, false, 0); but that adds a lot things to remember later on.
Expected result
The focus settings from the most active focused UI should have priority
Reproduction steps
Importancy
There's a workaround
Area(s)
FiveM
Specific version(s)
latest beta (18443)
Additional information
Pure JS server/client implementation
Hi, it's designed to work like that. If a resource sets NUI focus, then it has to remove it itself.