Skip to content

Fix NUI focus race when selecting option that opens another UI#2

Open
MrSandor wants to merge 1 commit intoSamuels-Development:mainfrom
MrSandor:fix-nui-focus-select
Open

Fix NUI focus race when selecting option that opens another UI#2
MrSandor wants to merge 1 commit intoSamuels-Development:mainfrom
MrSandor:fix-nui-focus-select

Conversation

@MrSandor
Copy link

@MrSandor MrSandor commented Mar 5, 2026

When selecting a target option that triggers another UI (such as an input menu), ox_target may still hold NUI focus while the action is executed. This can cause focus conflicts between interfaces, resulting in the cursor becoming locked or inputs behaving inconsistently.

This change releases the NUI focus before executing the selected option and delays the action by one frame (Wait(0)) to prevent focus race conditions. This issue commonly occurs when using other input menus such as "lation_ui".

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

Successfully merging this pull request may close these issues.

1 participant