mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 15:06:02 +01: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:
@@ -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