Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with autocomplete #1

Open
leforthomas opened this issue May 17, 2021 · 4 comments
Open

Issue with autocomplete #1

leforthomas opened this issue May 17, 2021 · 4 comments

Comments

@leforthomas
Copy link

Thanks for the theme!

I have an issue with Chrome and autocomplete. This is beyond my css knowledge and driving me nuts. I'm adding a screenshot below.

image

For some reason the autofill internal chrome css preempts everything else and it overlays on top of the label and the border and it doesn't look very good.

I tried various things such as forcing the background color to transparent (not working) moving the input downwards using zindex (prevents the click form working...). Any idea?

@msidlo
Copy link

msidlo commented Nov 28, 2022

Hi @leforthomas.

I know it's been some time you've posted your question. But I hope my answer can help others. I was able to find relatively simple solution by adding some css. This is the result.

Screenshot 2022-11-28 at 14 26 20

I added class with following properties for <input >

.browser-autocomplete-input {
    padding: 0px!important;
    border-radius: 4px;
    margin: 12px 15px 12px 48px;
}

@leforthomas
Copy link
Author

Thanks! I eventually managed using css as well but yours looks better :)

@rubensflinco
Copy link

rubensflinco commented Jun 4, 2023

Here's a modification to the CSS code that helps to not have to add the CSS class in each input manually, just add these CSS codes and that's it:

input:-webkit-autofill {
    padding: 0px!important;
    border-radius: 4px;
    margin: 12px 15px 12px 48px;
}

@shampain6660
Copy link

shampain6660 commented Oct 26, 2024

I came here to submit a PR fix to address this cause it shat me, and found this issue. Should have come here first!
Here was my fix, which removes the autofill completely, maintaining the original look and feel:

/* Handle browser autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px transparent inset !important;
    -webkit-text-fill-color: inherit !important;
    transition: background-color 5000s ease-in-out 0s;
    background-color: transparent !important;
}

I don't have permission to create a PR, so this will have to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants