Is there a way to prevent the LastPass browser extension from filling out a HTML-based form with a input field with the name \"username\"?
This is an hidden field,
For this latest October 2019 buggy release of Lastpass, this simple fix seems to be best.
Add
type="search"
to your input.
The lastpass routine checks the type
attribute to determine what to do with its autofill, and it does nothing on this html5 type
of "search." This fix is mildly hacky, but it's a one line change that can be easily removed when they fix their buggy script.
Note: After doing this, your input might appear to be styled differently by some browsers if they pick up on the type
attribute. If you observe this, you can prevent it from happening by setting the browser-specific CSS properties -webkit-appearance
and -moz-appearance
to 'none'
on your input.