How to hide autofill safari icon in input field
If you want to hide it completely, you can use the following css tricks. Basically it detect that 'contacts-auto-fill-button' and move it away from your input field. Make sure you have 'absolute:position' to avoid extra padding from your fields.
input::-webkit-contacts-auto-fill-button {
visibility: hidden;
display: none !important;
pointer-events: none;
position: absolute;
right: 0;
}
How to turn off Safari autofill in webpage source
I tried and failed with various "solutions" I found here on stack:
- Set attribute autocomplete="off" in both the form and input elements
- Added a hidden label both above and below the input tag
- Added a class name suggesting the input field type
- Tried a javascript solution
None of them worked. I still experienced a delay between clicking in a field and being able to enter text - and the user icon still presented phone number suggestions from my contact card.
I read an old, but otherwise helpful article about how to coax autofill to fill in the correct information. It didn't mention the solution I stumbled upon, but it inspired me to try it...
I added a placeholder attribute to the text input in my django form class:
val = forms.CharField(widget=forms.TextInput(attrs={"placeholder": "search term"}))
And that did it! Now when I click in a search term field (which now shows "search term" in light gray - which is grudgingly OK with me), I can enter text right away and the autofill icon does not appear!:
How to change Safari autocomplete key icon
This works for me. Will wrap into some tailwind class and that's it.
input::-webkit-credentials-auto-fill-button {
background-color: white;
}
Duplicate of this question:
Invalid selector webkit-credentials-auto-fill-button
Related Topics
When Printing Tables in Google Chrome, Content Overlaps Header
How to Display Alt Text for an Image in Chrome
How to Make a Div with Arrowlike Side Without CSS Border Tricks
How to Hide/Show a Div When a Button Is Clicked
Meta Viewport Just on Portrait
How to Navigate to a Section of a Page
Exclude Element with Fixed Positioning from Justify-Content in Flex Layout
HTML List Element: Sharing The Parent Width into Equal Parts
Can Outlook 2010 Use a Web Font in an HTML Email
Chrome Does Not Expand Flex Parent According to Children's Content
Word Wrapping for Button with Specified Width in IE7
Font-Awesome Icons Not Rendering via the Boostrapcdn
Equal Width Columns in CSS Grid
How to Remove The Previously Selected Option from a Drop-Down Menu in a Table