components icon indicating copy to clipboard operation
components copied to clipboard

Input placeholder doesnt rise when set value after beta.10

Open Knoxvillekm opened this issue 9 years ago • 10 comments

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

Knoxvillekm avatar Sep 14 '17 07:09 Knoxvillekm

Related to #6837 (with PR #6839).

julianobrasil avatar Sep 14 '17 12:09 julianobrasil

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.

jlkeiper avatar Sep 14 '17 15:09 jlkeiper

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

gise88 avatar Sep 15 '17 03:09 gise88

@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 avatar Sep 15 '17 12:09 jlkeiper

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!

jlkeiper avatar Sep 21 '17 15:09 jlkeiper

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

vokk avatar Sep 25 '17 06:09 vokk

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

It worked for me.

julianobrasil avatar Sep 25 '17 09:09 julianobrasil

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

Knoxvillekm avatar Sep 25 '17 09:09 Knoxvillekm

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

dzolnjan avatar Sep 28 '17 10:09 dzolnjan

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.