How does the lastpass icon determine when to appear on a form input?

Viewed 1429

The lastpass autofill icon appears on certain form fields, and on my site it has appeared unexpectedly on an input, with autocomplete="off", with no id and a name of CatName_autocomplete.

I understand I can add an attribute to disable it, but unless I do this for everything in my site, plus any other rival password managers, it could potentially crop up elsewhere. It interferes with my own custom javascript autocomplete functionality that I have on the control because it doesn't trigger the correct events to work properly.

Is there a way to find out the specific underlying logic it uses to decide whether to appear in an input? This would allow me to check I don't accidentally write misleading inputs that trigger it, or that I can know to put the attribute to disable it onto those I know would trigger.

1 Answers

I'm sure it's far more complicated than this, but in case it helps anyone: I disabled the icon in many fields on my page just by removing 'id' from the name attribute of the FIRST input element.

      <input type="text" class="form-control" placeholder="Schedule ID"
         name="scheduleId" [(ngModel)]="scheduleId" aria-label="Schedule ID"/>

triggers icons on the page, not just on this form.

      <input type="text" class="form-control" placeholder="Schedule ID"
         name="schedule" [(ngModel)]="scheduleId" aria-label="Schedule ID"/>

does not.

Related