For a reason I cannot determine, the password field is being populated when the form is submitted. This only happens in Firefox.
This is my form.
<form action="index.php/admin/settings/account" autocomplete="off" method="post">
<section>
<label for="email">Email</label>
<input type="text" name="email" value="test@test.com" autocomplete="off" />
</section>
<section>
<label for="password">Password</label>
<input type="password" name="password" value="******" autocomplete="off" />
</section>
<section>
<label for="confirm_password">Confirm Password</label>
<input type="password" name="confirm_password" value="******" />
</section>
<section>
<input type="submit" name="save" value="Save" />
</section>
</form>
<script>
console.log($('input[name="password"]').val());
$('form').submit(function(e) {
e.preventDefault();
console.log($('input[name="password"]').val());
});
</script>
As you can see. I have set the autocomplete="off"
on both the form and the relevant fields. If I save the form without making changes. Autocomplete doesn't fire.
If I change the email address to an email with a saved password the password is changed when the form is submitted.
This is what I get in the console.
Firefox.
******
123123
Chrome
******
******
Has anyone come across this before? How do I stop this?