Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

523
Visualizações
Enter key in android keyboard also in android-webview not working for input in JavaScript

I have input type text in my html inside form tag. Key down event of JavaScript is not executing when I press enter key of mobile devices. In computer keyboard it's working fine. When I put this input not inside form tag it's working fine in mobile devices. I tried keypress, key down, key up events.

$("body").on("keydown", "input, select, textarea, button", function(e) {
    var self = $(this),
        form = self.parents("form:eq(0)"),
        focusable,
        next,
        id;
    id = $(this).closest("tr").parent().parent().attr("id");


    if (
        e.keyCode == 13 ||
        e.keyCode == 9 ||
        e.key == "Next" ||
        e.key == "Go"
    ) {

        focusable = form
            .find('input[type!="checkbox"],a,select,button,textarea')
            .filter(":visible:not([readonly]):enabled");



        if (
            (this.type == "text" ||
                this.type == "tel" ||
                this.type == "email" ||
                this.type == "time" ||
                this.type == "select-one" ||
                this.type == "number" ||
                this.type == "date") &&
            $(this).attr("tabindex") < 700
        ) {

            previous_elem = $(this);
            valid_func_agets(this, e);
            return false;
        }
    }
})

Note:this inputs is under one div and am rewriting entire html when some events executes.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda