Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add attributes to quantity input to show numeric keyboard on mobile d…
…evices. This commit adds both a `pattern` attribute to restrict user's input to numerical characters, and the forwards compatible `inputmode` attribute to hint at the keyboard layout to use. These attributes combined make sure that the numerical keyboard shows instead of the normal keyboard on most mobile devices (tested on the latest versions of Android and iOS). Possible Caveats: - Due to the nature of the numeric keyboard on iOS it is impossible to add a decimal point. Further Reading: https://stackoverflow.com/questions/6178556/iphone-numeric-keyboard-for-text-input https://www.smashingmagazine.com/2015/05/form-inputs-browser-support-issue/ http://danielfriesen.name/blog/2013/09/19/input-type-number-and-ios-numeric-keypad/
- Loading branch information