mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-07 15:15:07 +00:00
fix(client/context): Allow using events to open context menus
There was an issue where if you wanted to open a second context menu using args from the first context menu's item with events, the nui focus would get stuck beacuse it would get set by the event.
This commit is contained in:
1 parent
8ef1b876e1
commit
c21054280c
1 file changed
+1
-1
@@ -35,10 +35,10 @@ end)
|
||||
|
||||
RegisterNUICallback('clickContext', function(data, cb)
|
||||
cb(1)
|
||||
SetNuiFocus(false, false)
|
||||
if data.event then TriggerEvent(data.event, data.args) end
|
||||
if data.serverEvent then TriggerServerEvent(data.serverEvent, data.args) end
|
||||
openContextMenu = nil
|
||||
SetNuiFocus(false, false)
|
||||
SendNUIMessage({
|
||||
action = 'hideContext'
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user