-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug, feature request, or proposal:
When binding a value to MdInput
using an expression, placeholder
attribute (or md-placeholder
) don't float when value is set, which results in placeholder text + input value to overlap. Also after focussing and blurring the input, the placeholder goes back to its original position. However, when using a static value, it works perfectly fine.
What is the expected behavior?
placeholder
attribute (and/or MdPlaceholder
) should float, also when initial MdInput
value comes from an expression.
What are the steps to reproduce?
- Create a property on component (
foo="bar"
) - Bind property to
MdInput
and give it a placeholder (placeholder="Some Placeholder"
)
Here's a Plunk that reproduces the bug: https://plnkr.co/edit/NnwmYrakshZ5DEBkW27D?p=preview
Is there anything else we should know?
There's an issue that might be related to this bug. When setting form values programmatically, placeholder positions also aren't updated. This issue can be found here: #2441
Someone came up with a fix for that as well: crisbeto@72bc742