mirror of
https://github.com/nextcloud/server.git
synced 2024-08-03 08:16:02 +02:00
modify password clone to password type right on submit to prevent the browser remind the content
This commit is contained in:
parent
38941a61bf
commit
938b12236a
11
core/js/jquery-showpassword.js
vendored
11
core/js/jquery-showpassword.js
vendored
@ -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 );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user