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

Reflect the values of autocorrect and autocapitalize attributes #378

Conversation

rossshannon
Copy link
Contributor

Reflect the values of autocorrect and autocapitalize attributes in the control input, if they were set on the original input. With tests.

iOS supports two HTML attributes on <input> elements called “autocorrect” and “autocapitalize”.

<input type="text" name="tags" autocomplete="off" autocorrect="off" autocapitalize="none">

They are particularly useful in stopping the OS from interfering with tagging interfaces, where many users prefer to keep all their tags in lowercase. At the moment, iOS will engage the Shift key on the virtual keyboard before a user starts typing into a selectized <input>, capitalizing the first character typed.

This pull request simply checks for the presence of these attributes on the original <input> element that selectize is called on, and attaches them to the generated control <input> with the same values. I added a couple of tests for this too.

titlecase_tags

…e control input, if they were set on the original input. With tests.
@brianreavis
Copy link
Member

Niceeee. Really useful contribution. Thanks man!

@brianreavis brianreavis reopened this Apr 30, 2014
brianreavis added a commit that referenced this pull request Apr 30, 2014
…utocorrect

Reflect the values of autocorrect and autocapitalize attributes
@brianreavis brianreavis merged commit 7a3c874 into selectize:master Apr 30, 2014
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

Successfully merging this pull request may close these issues.

2 participants