Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AutoComplete as acceptable attribute #1203

Closed
atwellpub opened this issue Nov 22, 2023 · 1 comment · Fixed by #1204
Closed

Add AutoComplete as acceptable attribute #1203

atwellpub opened this issue Nov 22, 2023 · 1 comment · Fixed by #1204

Comments

@atwellpub
Copy link

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

image

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:

#1123

@atwellpub
Copy link
Author

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant