Add AutoComplete as acceptable attribute
atwellpub opened this issue · 1 comments
Version
- Carbon Fields: 3.6.2
- WordPress: 6.4.1
- PHP: 8
Expected Behavior
I'm trying to disable LastPass suggestions on text inputs with first and last name. This article suggests that setting AutoComplete attribute to false should fix it: https://salesforce.stackexchange.com/questions/394617/how-to-prevent-lastpass-from-displaying-icon-inside-lightning-input#:~:text=In%20your%20LastPass%20browser%20extension,to%20disable%20the%20autofill%20feature.
Actual Behavior
Container definition
$this_field = CarbonField::make( $field->meta['_field_type'][0], $field->slug, $field->name )
->set_attribute('AutoComplete', 'off');
Steps to Reproduce the Problem
Comments
Potentially related:
Hi @emandiev thanks so much for looking into this one and helping me understand how the allow lists work.
Unfortunately, adding support for the AutoComplete
attribute did not solve my issue out of the box. Later, I would find from official LastPass Documentation that 'data-lpignore'=true
would solve the issue if a setting was toggled at the extension level. This is not ideal for my use case since the features being worked on would be distributed. So my workaround is currently CSS-powered:
div[data-lastpass-icon-root],
div[data-lastpass-infield]{
display: none !important;
}