Skip to content

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

Open
Mikk3lRo wants to merge 1 commit into
harvesthq:mainfrom
Mikk3lRo:placeholder-not-value
Open

Mikk3lRo wants to merge 1 commit into
harvesthq:mainfrom
Mikk3lRo:placeholder-not-value

Conversation

@Mikk3lRo

@Mikk3lRo Mikk3lRo commented Oct 8, 2017

Copy link
Copy Markdown

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.

This branch has not been deployed

No deployments
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