Hide Last Pass icon in input fields
Asked Answered
F

9

19

If you have the Last Pass extension installed in chrome it displays a ... on the right side of certain input fields.

I was wondering: Is there a way to hide this with css?

Friedcake answered 3/5, 2018 at 0:21 Comment(0)
I
37

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

data-lpignore="true"

Insolvable answered 31/10, 2018 at 18:31 Comment(3)
This also prevents LastPass from working at all on that field... – Hearne
As of 2022 this doesn't hide the the LastPass icon. – Childe
This solution requires that the user has also enabled the 'Respect AutoComplete=off' setting' in their LastPass extension settings LastPass support link – Birchfield
C
11

As of 2022 the LastPass icon is placed as a sibling to the input field, so I added this rule to my input container and it worked. 😎

  div[data-lastpass-icon-root] {
    display: none;
  }
Childe answered 19/12, 2022 at 8:27 Comment(4)
Even with data-lpignore="true" I couldn't get rid of LastPass icons. I've tried everything, this is the only thing that worked. Last pass looks for the Label text, a label "for=" text, the id, the name, the placeholder, if "full name" or "name" are in any of those, it would show. This worked!! THANK YOU, THANK YOU, THANK YOU, THANK YOU !!!! – Christophany
Now a days, it is working by div[data-lastpass-root] – Disbelieve
I was able to remove it from specific inputs by specifying the selector as .hide-lastpass ~ div[data-lastpass-icon-root] and assigning the "hide-lastpass" class to the input. I used "~" rather than "+" because in my site, there was a button right after the input I wanted it removed from, and the LastPass div is created after that button. – Couchant
One more thanks, if people know how to do this in tailwind without putting it in globals.css that would be great – Adonai
T
5

As of Oct 2023

place this either in you root css (if you want to disable it for the entire site och just 'above' the input fields you do not want the be affected by LastPass. First rule removes icon, second disables the popup part (i.e. autocomplete on field click) if you wish that as well.

div[data-lastpass-icon-root] { display: none; }
div[data-lastpass-root] { display: none; }
Tactic answered 27/10, 2023 at 13:27 Comment(0)
F
2

I figured it out!

I placed this in my input field styles:

background-image:none !important;
background-attachment:none !important;
padding-right:0 !important;
border:1px solid #ABADB3 !important;

Which had an effect, but something was still visible. Placing this in my global styles got rid of it completely:

div[id^=__lpform_] {
    display: none;
}
Friedcake answered 3/5, 2018 at 23:18 Comment(0)
E
2

To suppress the icon for an input field like below:

<input type="tel" id="cc-number" autocomplete="off">

I used below css:

img[id^='__lpform_cc-number_icon'] {
    display: none !important;
}

input {
background-image: none !important;
}

data-lpignore="true"

^^ no longer works I guess. I am not sure, as it didn't work in my case.

Ernest answered 21/9, 2020 at 20:7 Comment(1)
This was spot on for me but since I actually have a different background image in my input field, I didn't want to kill that too. I removed that part and it works fine with just the code between your first 2 brackets. Thanks for this, other solutions didn't work for me and this was killing my interface. – Counterfoil
M
2

I've also faced the same issue, As I am using Telerik RadCombobox and RadTextBox, Last pass icon is displaying in all the server controls.

Tried using below css: jst paste it in the aspx page

div[data-lastpass-icon-root] { display: none. }

Its working fine.

RadCombobox having icon lastpass

Radcombobox removed icon using above css

Mores answered 19/12, 2022 at 16:55 Comment(0)
H
0

Update NOV 2021

I have noticed that all LastPass widgets got class css-1obar3y.

div.css-1obar3y {
  display: none!important;
}

Works perfectly for me

Hashish answered 9/11, 2021 at 19:55 Comment(0)
C
0

Summary:

For STANDARD <input type='text' the following CSS/Style will work:

data-lpignore='true'
autocomplete='off'

However, LastPass will ignore "data-lpignore/autocomplete" when for any <input=type='text', the input 'id' or 'name' have the word "user", "name", or "email" or any synonym similar, OR EVEN if the label for said input has the "for" or label text containing the word "user", "name", or "email" or any synonym similar. In this case you must use:

DIV[data-lastpass-icon-root] {
  display: none !important; /* This disables LastPass */
}
Christophany answered 6/9, 2023 at 21:10 Comment(0)
D
0

I was able to handle this by below snippet. Maybe they've changed attribute name.

div[data-lastpass-root] {
   display: none;
}

Due to last-pass I was getting some extra space below to the footer on all pages of Angular.

Disbelieve answered 9/10, 2023 at 4:48 Comment(1)
Just a heads up in Jan 2024 the selector is this div[data-lastpass-icon-root] – Ostiary

© 2022 - 2024 β€” McMap. All rights reserved.