Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I want to prevent LastPass from filling out an input field on my site. I'm using AngularJS and HTML5, and the extension is autofilling the following input field. This field is a search field inside my page; it's not a login page.

<input id="search-publishers-box" type="text" placeholder="Search Publishers" data-ng-model="publishersSearchQuery.name" class="search-field-text" autocomplete="off"/>

What can I do to prevent LastPass from doing its autofill? I've tried to change the placeholder, the model, adding autocomplete="off", and changed the id of the input field.

None have worked at all for me.

like image 976
Liad Livnat Avatar asked Apr 14 '14 08:04

Liad Livnat


2 Answers

Put this attribute in your input element you wish to not have LP alter.

data-lpignore="true"
like image 130
Keegan Teetaert Avatar answered Oct 01 '22 03:10

Keegan Teetaert


Try using type="search" instead.. which is an invalid type... which will fallback to type text...

Stop LastPass filling out a form

like image 39
nawlbergs Avatar answered Oct 01 '22 05:10

nawlbergs