0

So I have a ui:inputSelect tag and when I use auto fill, the background color changes to yellow. How do I get rid of this feature and just keep the white background.

enter image description here

  • Are you using a form? – sfdcfox Feb 26 '18 at 12:29
  • no. It is in my lightning component .cmp – M guy Feb 26 '18 at 12:43
3

You need to apply some custom css to remove this. I have one for iinputText you can add it your UI tag.

/* Change the white to any color ;) */
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset;
}

Additionally, you can use this to change the text color:

/*Change text in autofill textbox*/
input:-webkit-autofill {
    -webkit-text-fill-color: yellow !important;
}

As this is related to browser and not with lightning.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.