Skip to content
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

Input placeholder doesnt rise when set value after beta.10 #7066

Closed
Knoxvillekm opened this issue Sep 14, 2017 · 10 comments
Closed

Input placeholder doesnt rise when set value after beta.10 #7066

Knoxvillekm opened this issue Sep 14, 2017 · 10 comments

Comments

@Knoxvillekm
Copy link

Knoxvillekm commented Sep 14, 2017

Bug, feature request, or proposal:

Bug

What is the expected behavior?

The placeholder should be placed above the input.

What is the current behavior?

When set value with { emitEvent: false }, the placeholder however, stays in the field, overlapping the value. See screenshot below:
input

What are the steps to reproduce?

Plunker template: https://plnkr.co/edit/sJzdfPYWoENNXHcQcLwG?p=preview

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 4.3.6
Angular Material 2.0.0-beta.10
Windows 10
Typescript 2.5.2

@julianobrasil
Copy link
Contributor

Related to #6837 (with PR #6839).

@jlkeiper
Copy link

jlkeiper commented Sep 14, 2017

I see the same behavior on forms rendered in a hidden but initialized component (and then revealed, as a step in a stepper), using 2.0.0-beta.11-f6c9172.

@gise88
Copy link

gise88 commented Sep 15, 2017

@jlkeiper same issue! I have followed the workaround that have pointed out @julianobrasil here and I solved

@jlkeiper
Copy link

@gise88 thanks, I was hoping to allow the component to initialize (makes a few calls while setting things up), but realize that may not be necessary if I pull it up a level. I'll try this out!

@jlkeiper
Copy link

jlkeiper commented Sep 21, 2017

Looks like a fix was committed yesterday, waiting for my local to catch up to it on material2-builds. Can't wait for beta-11!

@vokk
Copy link

vokk commented Sep 25, 2017

Don't work with emitEvent: false in beta.11.

@julianobrasil
Copy link
Contributor

julianobrasil commented Sep 25, 2017

@vokk, could please reproduce it here: [plunk removed to avoid confusion]

It worked for me.

@Knoxvillekm
Copy link
Author

Knoxvillekm commented Sep 25, 2017

add setTimeout
https://plnkr.co/edit/ctAIbwPeAB1tK2LsU4L4?p=preview
or do this on button click.
https://plnkr.co/edit/BwLi7sq1dyDJUBSiJkGQ?p=preview

@dzolnjan
Copy link

@devversion it doesnt work if value it set after component is initialized (setTimeout and button click)
check examples above created by @Knoxvillekm

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants