Andrus
Andrus

Reputation: 27955

Open numeric keypad on focus in html/javascript

How to open numeric keypad automatically on page load in Chrome in Android?

Tried

<!DOCTYPE html>
<html>
<head>
  <meta name="viewport" content="width=device-width, user-scalable=no" />
<script>document.addEventListener("DOMContentLoaded", () => document.querySelector("input[inputmode='numeric']").focus())
</script>
</head>
<body>
  <form action="/Ostupult" id="js-form" method="post">
    <input type="number" />
    <input type="tel" value="" min="0" max="9999" autofocus inputmode="numeric" step=".1" />
  </form>
</body>
</html>

Second field receives focus but numeric pad does not appear. Opening it requires manually touching input field to open numeric pad for number entry.

This is extra step for user. How to eliminate this so that quantity can immediately entered from numeric pad?

Using Zebra PS20 Personal Shopper in Android.

Upvotes: 0

Views: 285

Answers (0)

Related Questions