mathiasbynens / jquery-placeholder

A jQuery plugin that enables HTML5 placeholder behavior for browsers that aren’t trying hard enough yet
https://mths.be/placeholder
MIT License
3.98k stars 1.34k forks source link

JQuery.Validate & JQuery.PlaceHolder #187

Closed eat-sleep-code closed 9 years ago

eat-sleep-code commented 10 years ago

When using JQuery.Validate and JQuery.PlaceHolder together, the placeholder values are cleared on IE9 and older if a field is not valid. You must focus and then blur the field to get the Placeholder value to come back.

Newer browsers that do not need the JQuery.PlaceHolder plugin do not experience this behavior.

zhiyishou commented 10 years ago

This question also occur in my code with jquery.validata included

uzugoer commented 10 years ago

Validate plugins needs to name attribute and value. This plugin uses fake-password. So, IE9 and older, real password field hidden. Then, if empty password field(placeholder active) and submit action provoke error.

Sorry, English!

amerikan commented 9 years ago

I had similar issue and did this to fix it: https://github.com/mathiasbynens/jquery-placeholder/pull/230. Not sure if it'll fix yours, but you might want to try it.

amerikan commented 9 years ago

There is an issue when using jquery.validate. See #66. Closing this one since it's pretty much same issue.