I Wanted to Type a Number

Avatar of Chris Coyier
Chris Coyier on (Updated on )

DigitalOcean provides cloud products for every stage of your journey. Get started with $200 in free credit!

Zach Leatherman on the weirdnesses of numeric inputs. A new hero is born:

Luckily, the web standards people have recognized this mess and have standardized an appetizing alternative: the inputmode attribute. inputmode lets you directly specify which type of keyboard to use, independent of the type attribute value.

This new attribute isn’t supported anywhere yet, though.

They’ve also create a new plugin to help normalized numeric input behavior.

Direct Link →