Closed goodforenergy closed 9 years ago
I'm able to duplicate only if the password field is left empty. I have not fully looked into this, but I think the problem arises from here:
$(function() {
// Look for forms
$(document).delegate('form', 'submit.placeholder', function() {
// Clear the placeholder values so they don't get submitted
var $inputs = $('.placeholder', this).each(clearPlaceholder);
setTimeout(function() {
$inputs.each(setPlaceholder);
}, 10);
});
});
When submitting a form it'll call the setPlaceholder
method and if you look inside that method you'll see that it sets focus to fields.
Also this https://github.com/mathiasbynens/jquery-placeholder/issues/218 is probably a related if not the same issue.
+1
+1 . when there are multiple password fields, the placeholder text is filling the password input field when submitting an empty form for ie9 and below.
I've come cross this bug and fixed it in #259. The previous set hook and clearPlaceholder
are written with bugs. You can check the demo after fixing: http://alex1990.github.io/misc/placeholder-polyfill-test/placeholder-polyfill-test.html.
Should be fixed in latest version.
I have a form on which I am performing client side validation on submit (so as not to progress with the submit if there are issues). I have noticed that the password type input on the form gains focus on submit in browsers where the placeholder plugin is active. You can see this briefly on your demo page (before the submit actually happens), but I have made a fiddle for clarification.
Just press the submit button to reproduce the issue.