1
I’m using Cordova to develop my app using HTML, CSS and Javascript. When I use the command "Prompt" for the operator to insert an item in my app, Android brings the text box correctly, but does not focus on input, forcing the operator to tap the screen to focus on the field and bring the keyboard.
Can you do this automatically once you open the prompt? Is it some configuration in the Cordova project that does this?
Follows the function I use to bring Prompt to the operator.
function NovoItem(iId){
var sNome = '';
var opc = 0;
navigator.notification.prompt(
'Item:', // Mensagem que aparece
function(retorno){ // Função de CallBack
sNome = retorno.input1;
opc = retorno.buttonIndex;
if (opc == 1){
InserirItem(iId, sNome);
}
},
'Novo', // Título
['Ok', 'Cancelar'], // Botões disponíveis
''); // Texto padrão
}