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

Re: [whatwg] Hide placeholder on input controls on focus

From: James Ross <whatwg-20070806@james-ross.co.uk>
Date: Thu, 21 Mar 2013 11:10:37 +0000
Message-ID: <DUB109-W4871E4670CE66AF66DB1B1E3EB0@phx.gbl>
To: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>
> From: kit@iqmultimedia.com.au
> To: rescator@emsai.net; derernst@gmx.ch
> Date: Thu, 21 Mar 2013 01:18:26 +0000
> CC: whatwg@lists.whatwg.org
> Subject: Re: [whatwg] Hide placeholder on input controls on focus
> I'm skeptical that this is genuinely a significant issue with users, chiefly because I've never really seen any page authors feel the need to implement anything like this, and because as stated earlier Safari, Firefox and Chrome all use non-hiding placeholders in various places in their browser chrome without any sort of special treatment on focus.
> Surprisingly, the only example I could find of a developer doing something both on focus *and* once the user starts typing is Opera in its address bar and search field, which behaves as you describe; the placeholder text goes lighter on focus.
> Nevertheless, the _only_ browser I can find which actively removes its placeholder text on focus is IE 8 (in its search field). I can't believe that there needs to be a different implementation for fields in the browser's own chrome as for in-page form fields.

Just as an added data-point (that I only noticed today) - Windows 7's placeholder implementation in the Start menu and Explorer's search box:
 - The text is displayed in grey *and* italic *and* with a space at the start.
 - Focusing the input box with tab/Control-E or autofocus when opening the Start menu does *not* hide the placeholder.
 - Typing hides the placeholder and clearing to empty re-shows it.
 - Control-A or clicking in the textbox hides the placeholder.

This to me seems like a very interesting compromise between the two observed behaviours in browsers - autofocus does not prevent the user seeing the placeholder but any attempt to interact with it (by typing, mouse clicking or control-a) removes it.

I would be interested in why this behaviour was not adopted in IE10's input[placeholder] implementation.

James Ross silver@warwickcompsoc.co.uk 		 	   		  
Received on Thursday, 21 March 2013 11:11:07 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:56 UTC