Bug 21286 - placeholder attribute should apply to all focusable nodes that take text input
Summary: placeholder attribute should apply to all focusable nodes that take text input
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-01 15:37 PDT by Ojan Vafai
Modified: 2017-07-18 08:29 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2008-10-01 15:37:04 PDT
The ones that come to mind that are missing right now:
1. textareas
2. contentEditable nodes
3. the body element when designMode is on

In cases 2 and 3, it would be great if the placeholder text could be HTML and be CSS styleable.
Comment 1 Adele Peterson 2008-10-01 15:41:05 PDT
Ojan and I talked about this earlier today.  I think this is a good idea, and could replace a lot of JS that web authors have to write to get this behavior.

We should consider reorganizing the code so that maybe HTMLInputElement, HTMLTextAreaElement, and other editable elements can inherit from some common class.
Comment 2 Dave Hyatt 2008-10-01 15:47:31 PDT
It's a good idea, but we really need to be proposing this to HTML5 before we extend placeholder further IMO.
Comment 3 Ryosuke Niwa 2012-05-01 22:01:10 PDT
I've taken the liberty of posting this proposal on whatwg: http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-May/035615.html