[FIX] web: disale autofill on input elements
with this commit we disables autofill of autocomplete by setting
autocomplete=off, this was previously done in commit: 64293fbdb0
but it was not working because we were setting autocomplete=none
it seems that none does not work all the time.
task-2462676
closes odoo/odoo#71016
X-original-commit: 9d6ef842902e9e192924fa0caba99514e1543352
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
@@ -285,7 +285,7 @@ var InputField = DebouncedField.extend({
|
||||
inputAttrs = _.extend(inputAttrs, { type: 'password', autocomplete: this.attrs.autocomplete || 'new-password' });
|
||||
inputVal = this.value || '';
|
||||
} else {
|
||||
inputAttrs = _.extend(inputAttrs, { type: 'text', autocomplete: this.attrs.autocomplete || 'none'});
|
||||
inputAttrs = _.extend(inputAttrs, { type: 'text', autocomplete: this.attrs.autocomplete || 'off'});
|
||||
inputVal = this._formatValue(this.value);
|
||||
}
|
||||
|
||||
|
||||
@@ -7398,7 +7398,7 @@ QUnit.module('Views', {
|
||||
});
|
||||
|
||||
await testUtils.form.clickEdit(form);
|
||||
assert.hasAttrValue(form.$('input[name="display_name"]'), 'autocomplete', 'none',
|
||||
assert.hasAttrValue(form.$('input[name="display_name"]'), 'autocomplete', 'off',
|
||||
"attribute autocomplete should be set to none by default");
|
||||
form.destroy();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user