Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a number keyboard on mobile devices / setting the input pattern. #31

Closed
jboyer87 opened this issue Apr 3, 2019 · 5 comments · Fixed by #32 or #58
Closed

Using a number keyboard on mobile devices / setting the input pattern. #31

jboyer87 opened this issue Apr 3, 2019 · 5 comments · Fixed by #32 or #58

Comments

@jboyer87
Copy link
Contributor

jboyer87 commented Apr 3, 2019

As currently written, the plugin has the "type" property of the resulting input hard-coded as "text". This creates a type="text" input regardless of the original input type (for example, "number"). This hurts the "mobile-friendliness" claim of the addon because if a user tries to interact with an input that is supposed to be of a particular type, the mobile browser will instead revert to full-text input.

@shaack
Copy link
Owner

shaack commented Apr 4, 2019

Good point. Thanks for the recommendation.

@shaack shaack closed this as completed in #32 Apr 7, 2019
@shaack
Copy link
Owner

shaack commented Apr 7, 2019

Okay, I tested it, but it does not work. The native input type="number" ist hopelessly not aware of internationalization, which is a core feature of the bootstrap-input-spinner. See: https://stackoverflow.com/questions/13412204/localization-of-input-type-number
Therefore we can not use another input type than type="text", and a configuration makes no sense.

@jboyer87
Copy link
Contributor Author

Hmm, seems like adding a pattern might do the trick? pattern="[0-9]*" for alphanumeric? Good find. Have to do some testing.

@shaack
Copy link
Owner

shaack commented Apr 24, 2019

Yeah, could be. However, there might be problems with the thousand separator and also with the decimal separator. I will reopen this issue and will also do some Testing.

@shaack shaack reopened this Apr 24, 2019
@shaack shaack changed the title Retain original input type property Using a number keyboard on mobile devices / setting the input pattern. Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants