[whatwg] <textarea placeholder="">
Ian Hickson
ian at hixie.ch
Sun Mar 29 18:21:23 PDT 2009
On Tue, 2 Dec 2008, Ojan Vafai wrote:
>
> I don't follow. What's the difficulty with supporting placeholder for
> contentEditable?
Unlike form controls, contentEditable content is rendered using CSS rules,
so a placeholder would have to somehow fit into the CSS model. We'd need a
way to distinguish a contentEditable section that has user input vs one
that is empty, for example. In general I think it's better for us to just
leave this up to the user agent.
> The point is that you want it to correspond to focus state, so generated
> content doesn't really help you much there.
CSS has :focus; does that not help?
> > For <textarea>, a placeholder value seems odd. Do you have examples of
> > people doing that?
>
> I don't have examples other than Thomas's, however, a quick google
> search<http://www.google.com/search?rlz=1C1GGLD_enUS289US301&sourceid=chrome&ie=UTF-8&q=textarea+with+placeholder+text>does
> point to a lot of tutorial sites for adding placeholder text to
> textareas. I don't quite see what's odd about it though. It's just
> another case where you want to communicate what the user should put into
> an text-entry area and it has all the same complexity to the web
> developer that a text input has.
Fair enough. Added.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list