[Webkit-unassigned] [Bug 45940] REGRESSION (r67166): "Placeholder" text remains in input box after 2nd focus()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 24 16:18:53 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=45940





--- Comment #6 from Andy Estes <aestes at apple.com>  2010-09-24 16:18:53 PST ---
(In reply to comment #3)
> This might break some w3c guideline. but wouldn't it be nice to dim the placeholder text, instead of completely remove it on focus? that way you still know what you need to enter when you tab. keypress would clear the placeholder completely

>From <http://dev.w3.org/html5/spec/Overview.html#attr-input-placeholder>:

"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)."

Clearing the placeholder text on focus sounds like the right thing to do based on the spec. This is off the topic of this bug, but you could probably accomplish what you describe by listening to focus and keydown events in JavaScript.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list