-
Notifications
You must be signed in to change notification settings - Fork 6.8k
input place holder is hovering input value #2661
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
Comments
I was facing the same problem using a formcontrol on the input. While debugging I found out that the MdInputDirectives value is never changed. Therefore it always appears as empty and the md-empty class is added to the placeholder. So maybe there is a problem with the ControllValueAccessor. |
This affects me to with formControl and formControlName. With this bug material controls are unusable with Angular Forms. |
I've created a simple plunkr to show the issue: https://plnkr.co/edit/Uz09iLIyYgvgN3M4cSJ1?p=preview @jelbourn @kara Would one of you guys mind taking a look at this 🙊 |
Actually it seems like this PR already addresses this issue: The PR is merged but it doesn't seem to be released yet. This can be closed. |
Is there something similar like this for textarea? |
This is fixed in master, so closing. Should be out with our next release. |
@kara i am using dynamic form and i am setting value of that form from the code. but it seems that placeholder is not working properly. see this link for screenshot http://awesomescreenshot.com/06d68g233f. and also i won't be able to set value for select control. my code is like
|
@imVinayPandya What version of Material are you using? We haven't released the fix yet publicly, so unless you are working off of a master build, I wouldn't expect it to be updated. Can you repro your case on plunkr? |
I am using "@angular/material": "2.0.0-beta.1", my package.json is look like following. i am using teradata covalent angular 2 component which is using material 2 component inside it.
i am not doing any fancy thing, i am just patching dynamic form value. i have also tried this._projectForm.setValue({}). |
@imVinayPandya Since you are using our last release, the fix would not be in it. It's only in master. Once we make our next public release, you should be able to upgrade to a version that has the fix. |
Thank you @kara. and thanks to your angular 2 form videos. I have learned so many things from your videos. |
@kara Once again thanks for all the hard work, is there an ETA for the next release? |
@kara I'm using latest beta and this bug hasn't been fixed apparently… I'm experiencing the same thing as @imVinayPandya |
@uredkar that's exactly what I am experiencing, thanks! |
i was also experiencing the same issue. |
facing same issue in 2.0.0-beta.8 |
in my case it worked with |
That still an issue in beta10 =( If i click in the one input in the form.. it fixes all the inputs in that form ... my workaround for now is calling click event for the input |
It is still an issue in beta12. One possible workaround with declarative only changed is the following:
The placeholder displays correctly if input has a value before it. However, the nice animation is lost. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug
What is the expected behavior?
Placeholder should be deisplayed above input
What is the current behavior?
Placeholder is hovering value:

What are the steps to reproduce?
Which versions of Angular, Material, OS, browsers are affected?
OSX - Safari, Chrome (I did not check other browsers)
angular - 2.4.3
material - 2.0.0-beta.1
Is there anything else we should know?
Workaround:
To workaround this problem, add native
value
to input.The text was updated successfully, but these errors were encountered: