Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Input field labels appear fuzzy when using md-input container + ng-repeat + placeholder + template variable in placeholder #8377

Closed
a12k opened this issue May 8, 2016 · 2 comments
Assignees
Labels
has: Pull Request A PR has been created to address this issue resolution: duplicate

Comments

@a12k
Copy link

a12k commented May 8, 2016

Actual behavior:

  • What is the issue? The combination seems to produce multiple placeholder values superimposed on one another producing a fuzzy look. It seems to happen when:
  1. Using a placeholder value,
  2. ng-repeat the fields, and
  3. there is a template variable in the placeholder (in the demo using {{ $index }} in placeholder)

Removing any of these things causes the behavior to return to normal. This doesn't happen when using a label above the field and no placeholder or when using both a label and placeholder. I came across this behavior when using a button to dynamically add fields with ng-repeat.

CodePen or Steps to reproduce the issue: *

  • CodePen Demo which shows your issue : http://codepen.io/a12k/pen/rePGMm
  • Details: As you can see, all the field labels look fuzzy. When the field is clicked, one label stays on the field and another which appears to have been superimposed on top animates to above the field.

Looks to be similar to this older issue which was solved: #4462

Additional Information:

  • Browser Type: Chrome, Firefox, Internet Explorer 11
  • OS: Windows 10
  • Stack Traces:

Shortcut to create a new CodePen Demo.
Note: * indicates required information. Without this information, your issue may be auto-closed.

Do not modify the titles or questions. Simply add your responses to the ends of the questions.
Add more lines if needed.

@crisbeto
Copy link
Member

crisbeto commented May 8, 2016

They're not supposed to look like that. We have an open PR to address this at #8291. You can work around this for now by replacing the placeholder attribute with a <label> inside the md-input-container.

@crisbeto crisbeto self-assigned this May 8, 2016
@crisbeto crisbeto added has: Pull Request A PR has been created to address this issue resolution: duplicate labels May 8, 2016
@crisbeto
Copy link
Member

crisbeto commented May 8, 2016

I'll close the issue since it's a duplicate of #8251.

@crisbeto crisbeto closed this as completed May 8, 2016
crisbeto added a commit to crisbeto/material that referenced this issue Jun 1, 2016
* Fixes the element label being duplicated, if it has a data binding in the placeholder attribute. This was caused by Angular re-adding the placeholder attribute, even though it was removed by the Material placeholder directive.
* Fixes the aria-label getting the raw data binding (e.g. `aria-label="{{expression}}"`), when it's gets taken from a dynamic placeholder.

Fixes angular#8251.
Fixes angular#8377.
crisbeto added a commit to crisbeto/material that referenced this issue Jun 3, 2016
* Fixes the element label being duplicated, if it has a data binding in the placeholder attribute. This was caused by Angular re-adding the placeholder attribute, even though it was removed by the Material placeholder directive.
* Fixes the aria-label getting the raw data binding (e.g. `aria-label="{{expression}}"`), when it's gets taken from a dynamic placeholder.

Fixes angular#8251.
Fixes angular#8377.
ThomasBurleson pushed a commit that referenced this issue Jun 3, 2016
* Fixes the element label being duplicated, if it has a data binding in the placeholder attribute. This was caused by Angular re-adding the placeholder attribute, even though it was removed by the Material placeholder directive.
* Fixes the aria-label getting the raw data binding (e.g. `aria-label="{{expression}}"`), when it's gets taken from a dynamic placeholder.

Fixes #8251.
Fixes #8377.

Closes #8291
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has: Pull Request A PR has been created to address this issue resolution: duplicate
Projects
None yet
Development

No branches or pull requests

2 participants