Stop LastPass filling out a form

前端 未结 13 1719
遇见更好的自我
遇见更好的自我 2020-12-07 13:38

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,

13条回答
  •  失恋的感觉
    2020-12-07 14:09

    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.

提交回复
热议问题