W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2009

[whatwg] <textarea placeholder="">

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 30 Mar 2009 01:21:23 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0903292200550.25082@hixie.dreamhostps.com>
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.   `._.-(,_..'--(,_..'`-.;.'
Received on Sunday, 29 March 2009 18:21:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:47:49 GMT