diff --git a/[core]/esx_menu_dialog/client/main.lua b/[core]/esx_menu_dialog/client/main.lua index 82588182..cce26666 100644 --- a/[core]/esx_menu_dialog/client/main.lua +++ b/[core]/esx_menu_dialog/client/main.lua @@ -15,7 +15,9 @@ local function openMenu(namespace, name, data) }) local timeoutId = ESX.SetTimeout(200, function() - SetNuiFocus(true, true) + if next(OpenedMenus) then + SetNuiFocus(true, true) + end end) table.insert(Timeouts, timeoutId) diff --git a/[core]/esx_menu_list/client/main.lua b/[core]/esx_menu_list/client/main.lua index 690c8ef6..6bab13a3 100644 --- a/[core]/esx_menu_list/client/main.lua +++ b/[core]/esx_menu_list/client/main.lua @@ -12,7 +12,9 @@ CreateThread(function() data = data, }) SetTimeout(200, function() - SetNuiFocus(true, true) + if next(OpenedMenus) then + SetNuiFocus(true, true) + end end) end