views:

1501

answers:

3

Hello !

I have design problem with Google Chrome and its form autofill function. If Chrome remembers some login/password it changes a background color to a yellow one.

Here are some screenshots:

alt text alt text

How to remove that background or just disable this autofill ?

+3  A: 

In Firefox you can disable all autocomplete on a form by using the autocomplete="off/on" attribute. Likewise individual items autocomplete can be set using the same attribute.

<form autocomplete="off" method=".." action="..">  
<input type="text" name="textboxname" autocomplete="off">

You can test this in Chrome as it should work.

Kinlan
+7  A: 

Apply this CSS:

input:-webkit-autofill {
    color: #fff !important;
}

Just tested on my site and it doesn't work on background-color :(

Edit: After doing some research I found this jQuery:

if ($.browser.webkit) {
    $('input[name="password"]').attr('autocomplete', 'off');
}

Maybe that will help.

Kyle Sevenoaks
Interesting. I suspect the yellow color is meant as a security-relevant highlight to tell the user that something happened. The fact that you can disable that from the site CSS looks like a security problem to me.
Joachim Sauer
Oh, and +1 for an actual on-topic plug of your site ;-)
Joachim Sauer
I agree, but there always should be a way to change such behaviours, going back to my example that this color clashes with the rest of my site design.
Kyle Sevenoaks
Your CSS changes text color to white but do not touches background-color. Overwrite it does nothing.
hsz
You're right, it does only change the font color.. Not the background. After more research, seems the only way to do anything with it is a jQuery.
Kyle Sevenoaks
What do you mean ? What way ?
hsz
To disable the autocomplete function in Chrome. There is no current way to change the colors.
Kyle Sevenoaks
@Kyle: no offence, but your site design is not as important as the browsers makers security concerns. If they think it's necessary to always show auto-filled text fields in a specific colour, then they should pretty well be able to override anything you try to define.
Joachim Sauer
Agreed, they should definitely have this function, it's a great help to a lot of people using Chrome, but the ability to change the color of it so it doesn't clash so much with site's designs would be great also. See here: http://code.google.com/p/chromium/issues/detail?id=1334
Kyle Sevenoaks
@Kyle: I understand the complaints, but the problem remains: if the web page were allowed to change the style, then it could easily trick the user into submitting his stored credentials without him knowing that they are transmitted, which would be a *major* security flaw. Setting the background color and not setting the foreground, however is simply wrong.
Joachim Sauer
Yeah, you're right, this could be used to trick users into submitting things. Security > aesthetics.
Kyle Sevenoaks
A: 

I Think goolge has resolved this issue in its new update. And thats the only thing which keep away many people from Chrome!

zain