Clientwarning
Mouse cursor stuck on screen after closing a menu
Also seen as: cursor stuck fivem nui cursor won't go away mouse focus stuck
What causes it
A NUI menu gave focus with SetNuiFocus(true,true) but never released it with SetNuiFocus(false,false) on close, trapping the cursor.
How to fix it
Call SetNuiFocus(false, false) whenever the menu closes.
- Ensure every close path calls SetNuiFocus(false, false).
- Handle the Escape key / close button to release focus.
- As a stuck-state recovery, some servers add a command that force-releases focus.
- Test opening and closing repeatedly to confirm focus is released.
Related errors
Related guides
Still stuck? We can help.
Optimized, dual-framework scripts for QBCore and ESX from Viper Development — escrow protected, delivered instantly to your Cfx portal.