Stop Lastpass Filling Out a Form

Stop LastPass filling out a form

Adding

data-lpignore="true"

to an input field disabled the grey LastPass [...] box for me.

Sourced from LastPass.com

How to prevent LastPass (chrome extension) from auto-filling input field

Here's my take on this, and usually what I do to solve the autofill problems (yes, they're obscure but they do happen) – I usually watch the fields for changes. Since you're using AngularJS, its pretty easy to do with $watch, or if you're using jQuery, just use .change

And then, whenever there's a change of more than one character at one time, you can assume that its autofill and not someone typing.

Note that this breaks if someone decides to paste into the field.

Another workaround is to allow change on the field only when there's a keypress.

EDIT Here's a fiddle

Why is autocomplete=off being supposedly added by my LastPass browser extension for this one page at least, and how can I prevent it from doing so?

For now it seems to work if I add a TamperMonkey script to overwrite the value.

This is not as large a solution as the jonmetz fellow mentioned making his own plugin (his is in Firefox), and can be duplicated as needed. If this is needed a lot, then maybe an extension would be more convenient.

Because of the dynamic and repeated nature of the issue on the page, a simple assignment did not work, and was overwritten.

My preference for the attribute remains as the end result if I add an onFocus Event Listener thusly:

var emailInput = document.querySelector('input[name="to_email"]');
emailInput.addEventListener('focus', function(){
this.autocomplete = "on";
});

I also do this in case it helps at all:

var parentForm = emailInput.parentNode;
parentForm.setAttribute('_lpchecked', '1');

Hide Last Pass icon in input fields

You can also hide the icon by adding this attribute to the input element:

data-lpignore="true"

How to stop form auto fill

You can just turn off autocomplete for the form completely seeing it's just a login form<form autocomplete="off"></form>



Related Topics



Leave a reply



Submit