Common Issues
Not able to type in inputs
This issue only affects custom apps. It is usually caused by another resource calling SetNuiFocus(false, false) while LB Phone or LB Tablet is open, which removes keyboard focus from the custom app.
To confirm that NUI focus is being changed, paste the code below into the NUI devtools console.
registerPushFunction(function (type, ...args) {
switch (type) {
case 'rootCall': {
const [dataString] = args
const data = JSON.parse(dataString)
if (data.type == 'focusFrame') {
console.log('^2Focusing frame^4', data.frameName, '^7')
focusFrame(data.frameName)
} else if (data.type == 'blurFrame') {
console.log('^1Blurring frame^4', data.frameName, '^7')
blurFrame(data.frameName)
} else if (data.type == 'setHandover') {
handoverBlob = data.data
} else if (data.type == 'setServerAddress') {
serverAddress = data.data
} else if (data.type == 'setZIndex') {
const { frameName, zIndex } = data
if (frameName in citFrames) {
citFrames[frameName].style.zIndex = zIndex
}
}
break
}
case 'frameCall': {
const [frameName, dataString] = args
const data = JSON.parse(dataString)
if (!(frameName in citFrames)) {
return
}
citFrames[frameName]?.contentWindow?.postMessage(data, '*')
break
}
}
})- Connect to your server.
- Open the NUI devtools.
- Open the Console tab.
- Paste the code above and press Enter.
- Recreate the issue in the custom app.
- Look for
Blurring frameorFocusing framein the NUI devtools or F8 console. - If
Blurring frameappears when typing stops working, find the resource that callsSetNuiFocus(false, false)and prevent it from changing focus while LB Phone or LB Tablet is open.