[whatwg] Hide placeholder on input controls on focus

Markus Ernst derernst at gmx.ch
Wed Mar 20 02:18:42 PDT 2013


Am 20.03.2013 02:20 schrieb Kit Grose:
> In almost every case the placeholder remains visible until the user has begun typing, as I strongly believe it ought to be remain in the specification, since it provides the contextual hint for as long as possible.
Do you refer to author implementations via scripting? As in Opera and IE 
10, the placeholder gets hidden when the field is focused; thus, 
regarding browser implementations, the "almost every case" refers to 
Firefox, Chrome, and some versions of Safari.

> That it has historically been implemented in a way that implies selectable content is, I believe, chiefly due to the lack of support for a "right" way to do this (which has led many developers to implement the placeholder text simply by setting the field's value to the placeholder text as the simplest implementation).
The current implementations of Firefox and Chrome seem to imply 
selectable content at least to some users, as Tim and myself reported in 
this thread. Both show the placeholder in a lighter color than the input 
text; this does not seem to fully solve the issue, maybe because many 
web designers color text in form fields anyway.

The problem is that some users do not even start to type when they see 
text in the field they focused. Thus I strongly believe that some 
visible hint at the _focusing_ moment would be helpful for these users. 
If the Opera and IE behaviour of totally hiding the placeholder is 
considered as suboptimal, the placeholder could be blurred, made 
semi-transparent or whatever; but I am sure that something should happen 
when the control gets focus, and not only when the user starts typing.



More information about the whatwg mailing list