Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

520
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!