W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2011

[whatwg] Placeholder visibility on focus

From: Thomas Maas <thomas@webtypes.com>
Date: Tue, 19 Jul 2011 12:55:38 +0200
Message-ID: <CF0D811D-FC5C-42B2-994F-62D736B1903F@webtypes.com>
Agreed,

instead of checking for an empty string *and* focus the user agent should just check for an empty string.

current spec:
when the element's value is the empty string and the control is not focused (e.g. by displaying it inside a blank unfocused control)

proposed spec:
when the element's value is the empty string (e.g. by displaying it inside a blank control)

Motivations:

1) autofocus + placeholder is useless in current spec
2) a placeholder is supposed to give a hint. It's not logical to hide the hint before you actually add content. As the act of adding content probably means you understood the hint, not the act of focussing.


- Thomas Maas

-- 
Webtypes
Thomas Maas
email: thomas at webtypes.com
twitter: @thomasmaas
skype: thomasmaas

On Jul 19, 2011, at 12:40 , TAMURA, Kent wrote:

> 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-placeholder-attribute
>>  User agents should present this hint to the user, after having stripped
>> line breaks from it,
>> when the element's value is the empty string and the control is not
>> focused (e.g. by
>> displaying it inside a blank unfocused control).
> 
> I'd like to propose to change this part so that we allow UAs to show
> placeholder text even if the control is focused.
> 
> * This behavior might depend on platforms.
>   The password field of Windows 7 logon screen shows placeholder text when
> the field is focused.
> 
> * autofocus + placeholder is useless in the current specification.
> 
> --
> TAMURA Kent
> Software Engineer, Google
> 
> 
> 
Received on Tuesday, 19 July 2011 03:55:38 UTC

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