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

[BUG] - Input autofill highlight #2005

Closed
Innders opened this issue Nov 20, 2023 · 7 comments
Closed

[BUG] - Input autofill highlight #2005

Innders opened this issue Nov 20, 2023 · 7 comments
Labels
🐛 Type: Bug Something isn't working

Comments

@Innders
Copy link

Innders commented Nov 20, 2023

NextUI Version

2.2.6

Describe the bug

When autofilling inputs on chrome there's an ugly highlighting of the text. I'm not sure if it's a bug but it doesn't look very nice and clashes with the style of the input.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Input type text or password.
  2. Use autofill on chrome to fill the input value. Also the same for password autofill.
  3. New filled text has highlighted background.

Expected behavior

Autofill text without highlight background.

Screenshots or Videos

image

Operating System Version

MacOS

Browser

Chrome

@Innders Innders added the 🐛 Type: Bug Something isn't working label Nov 20, 2023
@ghost
Copy link

ghost commented Nov 27, 2023

@Innders This is the Styles embedded by Chrome, Any Framework you pick has the same thing the way around is to either disable the Autofill or Customize the Styles embedded by Browser.

@Oolix
Copy link

Oolix commented Nov 30, 2023

Unfortunately not a bug but if you want to get rid of it put this in your globals.css:

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active{
    -webkit-background-clip: text;
    transition: background-color 5000s ease-in-out 0s;
}

@getellez
Copy link

But in the nextui docs the input doesn't look like that, why?

@getellez
Copy link

@Innders I fixed the background by removing the colors property from the theme in the tailwind.config.js file

@dejavuhuh
Copy link

@Innders I fixed the background by removing the colors property from the theme in the tailwind.config.js file我通过从 tailwind.config.js 文件中删除 theme 的颜色属性来修复背景

@getellez How did you do that?

@awesome-pro
Copy link
Contributor

awesome-pro commented Jul 23, 2024

@Innders this issue has been solved by this pr kindly close it.

@wingkwong
Copy link
Member

Fixed in #3430

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants