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

Autocomplete on HTML5 inputs (emails, tel, ...) #34

Open
ZenCocoon opened this issue Nov 7, 2011 · 4 comments
Open

Autocomplete on HTML5 inputs (emails, tel, ...) #34

ZenCocoon opened this issue Nov 7, 2011 · 4 comments

Comments

@ZenCocoon
Copy link
Contributor

Hi,

Wishing to add autocomplete support on the new HTML5 input types, like email, tel, ..., I realized that it's blocked to "text" types so far : https://github.com/madrobby/scripty2/blob/master/src/ui/controls/autocompleter.js#L23

I guess the main goal being to avoid "submit" types right? Would you consider the following selector input:not([type="submit"]) proper as a replacement ?

Hoping that helps,
Best regards,

  • Sébastien Grosjean - ZenCocoon
@rafalwrzeszcz
Copy link
Contributor

Not only that - you would have to exclude also "reset", "hidden", "radio", "checkbox", "button" and probably some other types also.

@ZenCocoon
Copy link
Contributor Author

That's a good point, there's actually way more that would not make sense (datetime, range, ...), thanks for pointing that out.

It's then better to pick only the potential ones then.
What would you think of allowing the following types : text, email, tel, url, search

@rafalwrzeszcz
Copy link
Contributor

I think this is exacly what we need.

@ZenCocoon
Copy link
Contributor Author

The following selector works but wonder if something cleaner would exist ?

input[type="text"],input[type="email"],input[type="tel"],input[type="url"],input[type="search"]

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

No branches or pull requests

2 participants