ScriptsAboutBlogToolsKnowledge BaseReviewsFAQBasketDocsSupport
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.

  1. Ensure every close path calls SetNuiFocus(false, false).
  2. Handle the Escape key / close button to release focus.
  3. As a stuck-state recovery, some servers add a command that force-releases focus.
  4. 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.