-
Notifications
You must be signed in to change notification settings - Fork 8
multiline placeholder #14
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
Comments
I can see situations where this would be useful, such as showing an expected address format or something. However it breaks compatibility with HTML: https://www.w3.org/TR/html5/forms.html#the-placeholder-attribute
That said, it appears that browsers do allow you to use I am going to close this issue because it is going against the HTML spec even though the idea could be extremely useful. If anyone decides to hack in the code, I am open to receiving pull requests that make this functionality much easier and more cross-browser. The biggest hurdle is making it work for all browsers and especially when not shimmed (or we have to detect the values and decide on a field-basis whether or not we shim). |
I found a workaround that is working for me. https://gist.github.com/theraaz/5e900c084ebac454162e |
Reopening this ticket. That solution is about what I do for browsers that do not support placeholders. I could incorporate their selector and still patch textareas even if the browser does support placeholders. There are still some difficult things:
|
The above workaround as an Angular directive (in CoffeeScript):
Usage:
|
It would be good if multiline placeholder was supported for textarea with \n or something
The text was updated successfully, but these errors were encountered: