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

Feature request: Override control input type #1135

Closed
wants to merge 1 commit into from

Conversation

zeitiger
Copy link
Contributor

@zeitiger zeitiger commented Aug 12, 2016

Currently the control input is a simple text input.

Sometimes its quite helpful override the input type for touch devices e.g. for input of numeric data is a <input type="tel"> better option for a small smartphone.

image1

This pull request include

  • 2 test cases (select and input)
  • documentation for a new setting
  • 2 new demo cases with input-tag-with-dialpad and select with search country telephone codes

@coveralls
Copy link

coveralls commented Aug 12, 2016

Coverage Status

Changes Unknown when pulling 5b7f149 on zeitiger:customInputType into * on selectize:master*.

@joallard
Copy link
Member

Interesting, I like it. On an <input> tag, shouldn't we mirror the original type by default? Meaning if I selectize an input[type=tel] tag, it should be applied to the control.

@joallard joallard added this to the 0.13.0 milestone Aug 12, 2016
@zeitiger
Copy link
Contributor Author

zeitiger commented Aug 18, 2016

Sure is this possible, the problem was that browser like Chrome response to something like that

<input type="number" value="5,23,42,1337"/>

with an error because 5,23,42,1337 is not a number on the HTML level.
So in the most cases it will be the better option to say the source input element is a plain text input and override type of control input within user settings.

I add now the logic take input type from source input as suggestion for type of control input and add some test cases for that.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 9de1b52 on zeitiger:customInputType into * on selectize:master*.

@zeitiger
Copy link
Contributor Author

IMHO I would prefer inputmode attribute, but that isn't supported by any browser at the moment

<input inputmode="tel">

http://caniuse.com/#feat=input-inputmode

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2021

This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants