Input Type Number Does Not Work on Window Surface Tablet

I noticed that if we try to open https://www.w3schools.com/html/tryit.asp?filename=tryhtml_input_number

in Chrome on a Windows Surface Tablet, it will behave like a desktop browser. I mean on a tablet (mobile) device, if I click on <input type="number">what Chrome will show a numeric keypad. But a text keyboard will appear on the surface of Chrome.

In addition, mobile browsers also help in the work with the user, showing a special keyboard, more suitable for entering numbers when the user tries to enter a value. developer.mozilla.org

Is there a way to make Chrome on Windows Surface behave like a mobile browser? At least for a number field?

+6
source share
2 answers

you can try it

<input type="number" />
Run code
0
source

I don't have Windows Surface with Chrome for testing, but try

 <input inputmode="numeric" pattern="[0-9]*" type="text" name="something">

This should still force the browser to open the numeric keypad.

0
source

Source: https://habr.com/ru/post/1694252/


All Articles