Skip to content
Snippets Groups Projects
Commit 938b1223 authored by Morris Jobke's avatar Morris Jobke
Browse files

modify password clone to password type right on submit to prevent the browser remind the content

parent 38941a61
No related branches found
No related tags found
No related merge requests found
......@@ -103,7 +103,16 @@
$clone.bind('blur', function() { $input.trigger('focusout'); });
setState( $checkbox, $input, $clone );
// set type of password field clone (type=text) to password right on submit
// to prevent browser save the value of this field
$clone.closest('form').submit(function(e) {
// .prop has to be used, because .attr throws
// an error while changing a type of an input
// element
$clone.prop('type', 'password');
});
if( callback.fn ){
callback.fn( callback.args );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment