GUI / covid-vaccine-spotter

https://www.vaccinespotter.org
MIT License
510 stars 138 forks source link

Changes zipcode to only accept numbers #125

Closed jaredhasenklein closed 3 years ago

jaredhasenklein commented 3 years ago

This change fixes #123. By changing the input type from text to number, mobile will default to showing the number pad. Desktop/laptop users will still type into the box, but letters will be rejected.

GUI commented 3 years ago

Thank you! Sorry to not take this PR, but I fixed this in a very slightly different way in https://github.com/GUI/covid-vaccine-spotter/commit/8ee2347172081cc4b8c35aa74e9965bc44547dd9 It achieves largely the same thing, but doesn't use type=number, which has some usability issues that Gov.uk addresses in great detail (the scrolling issue in particular seems to always bite me personally): https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/ So I hope all that makes sense, but I still really appreciate you taking the time to submit this PR!