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

Use the placeholder attribute instead of faking it with value. #2904

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Mikk3lRo
Copy link
Contributor

@Mikk3lRo Mikk3lRo commented Oct 8, 2017

Summary

I'm guessing the reason Chosen sets the value of the search-input in multi-selects instead of using the placeholder attribute is for historical / compatibility reasons... but:

  1. Chosen clears the placeholder as soon as the search field receives focus, while other inputs keep the placeholder visible until the user starts typing. Of course this is impossible (or at least very unpractical) when using the value as placeholder. Using a "real" placeholder provides a more consistent UX.
  2. All modern browsers have supported the placeholder attribute on text inputs for at least 5 years now... it should be safe to switch.
  • All changes were made in CoffeeScript files, not JavaScript files.
  • You used Grunt to build the JavaScript files and tested them locally.
  • You've updated both the jQuery and Prototype versions.
  • You haven't manually updated the version number in package.json.
  • If necessary, you've updated the documentation.

@JJJ JJJ mentioned this pull request Jul 22, 2020
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.

1 participant