2 ms·
> While input type="number triggers numeric keyboards on touchscreens leading to better mobile UX, that can also be accomplished by configuring the pattern attr
by howard941 8y ago
> While input type="number triggers numeric keyboards on touchscreens leading to better mobile UX, that can also be accomplished by configuring the pattern attribute in a certain way (Zach Leatherman has a great deep dive post into all of this).
The pattern attribute workaround is fine but limited to iOS as Leatherman himself notes, and its implementation treats other mobile users as second class citizens, reduced to the non-existent numeric row (at least on Android). The root cause of this mess is IMO the spec that inexplicably defines two fields of near zero ("tel", except for autofill I suppose) or ambiguously weirded utility, i.e. the described, broken "number"/roller field that encourages browser devs to surprisingly treat vertical mouse movements as inputs to typeable fields.