material icon indicating copy to clipboard operation
material copied to clipboard

Input value from Cache is turning Yellow & blurry

Open KSanthanam opened this issue 11 years ago • 5 comments

I have the email address input inside md-container. If the input is selected from the cache then the field is turning Yellow & blurry. If I add a character or remove a character and re add the yellow goes away. My html & signin.modelOptions = {updateOn: 'default blur'}; <md-input-container layout-fill> <label>Email</label> <input name="emailAddress" form-name="signinForm" required ng-model="signin.credentials.email" ng-model-option="signin.modelOptions" placeholder="Email" type="email"> <span layout-fill ng-messages="signinForm.emailAddress.$error"> <span layout-fill ng-message="required">Email is required</span> <span layout-fill ng-message="email">Must be a valid Email address</span> </span> </md-input-container>

  1. Select from the history screen shot 2015-04-11 at 11 07 35 am
  2. Selected screen shot 2015-04-11 at 11 07 47 am
  3. add a character.

screen shot 2015-04-11 at 11 07 55 am

KSanthanam avatar Apr 11 '15 01:04 KSanthanam

@KSanthanam - Please provide a CodePen or Plunkr that demonstrates this issue.

ThomasBurleson avatar Apr 11 '15 13:04 ThomasBurleson

This is most likely due to the autofill from chrome. It is a bug in how chrome deals with populating fields with stored data. I could find the bug if you need.

It is actually the placeholder being slightly off from the input

O-Mutt avatar Apr 12 '15 02:04 O-Mutt

@ThomasBurleson. Sorry my code is reorganised into components. I am not able to replicate on Plunker without the folder structure needed for the components. Can I give you the components code, would it help. I reckon it is the angular-material/angular-animate issue. If you need I can send you the component code.

@Mutmatt There are two issues. 1) The blur & 2) the yellow background.

KSanthanam avatar Apr 12 '15 12:04 KSanthanam

The problem is chrome's autofill having, by default, a yellow background. There's to parts here to fix:

  1. Yellow background. You can fix this with
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px <your-bg-color> inset;
}
  1. Shadow (which appears as a blur)
input:-webkit-autofill {
   text-shadow: none;
}

However there's also accessability to consider. The yellow background is a universally recognized style for chrome users and overwriting it should only be done for very valid reasons. :)

Antariano avatar Jun 15 '15 15:06 Antariano

dup of #1376

naomiblack avatar Aug 14 '15 21:08 naomiblack