mathiasbynens/jquery-placeholder — Issue #45: Replacement Password field in IE7 breaking form submission
Author: jgraham821
Created: 2011-12-23 16:25:25+00:00
State: open

In the setPlaceholder function, when the replacement field is created for the password field, the name attribute is removed from the replacement field. In IE7 at least, any input in the form that follows the replacement field is not submitted by the browser to the server. This is in fact causing the password field to not be submitted to the server at all because this replacement field was added to the DOM before the real password field.

$replacement
.removeAttr('name')
// We could just use the `.data(obj)` syntax here, but that wouldn’t work in pre-1.4.3 jQueries
.data('placeholder-password', true)
.data('placeholder-id', id)
.bind('focus.placeholder', clearPlaceholder);

I've fixed this issue for myself by just modifying the name attribute to be something we would never use in a form versus removing the name. For example, I just appended ".replacement" to the name and that solves the issue.