beva4q
Last Updated: February 25, 2016
·
1.158K
· janvl

Hide placeholder on :focus in webkit

In webkit, the placeholder doesn’t disapear on focus.

This line fixes the issue:

:focus::-webkit-input-placeholder{color:transparent;}

credits to Jeremy Benaim

2 Responses
Add your response

4146

Question for you, why would you want the placeholder to disappear on focus as opposed to when the user actual starts typing and thats when it goes away? and in firefox the placeholder doesn't disappear on focus either..

over 1 year ago ·
20686

Big accessibility fail! Makes me sad to see this nonsense gets promoted by the official Coderwall twitter-account … :-(

over 1 year ago ·