PolymerElements / paper-input

A Material Design text field
https://www.webcomponents.org/element/PolymerElements/paper-input
130 stars 162 forks source link

paper-input title stuck after reset #605

Closed punkratz312 closed 6 years ago

punkratz312 commented 6 years ago

The paper-input does not rerender itself after resetting its value to empty. The label gets cleared as expected but the title label does not move back ontop the input.

image

punkratz312 commented 6 years ago

@notwaldorf plz reply

notwaldorf commented 6 years ago

I can't repro anymore (I think this was fixed in the recent release): http://jsbin.com/botetem/edit?html,output

punkratz312 commented 6 years ago

@notwaldorf The bug is still active! In your example you reset the value by explicit hand of course this will work. In my case and thats more like a real world scenario i have a binding to the elements value. The binding works, the input is empty, but still does not rerender itselfe.

notwaldorf commented 6 years ago

Then do you have some repro steps? You didn't provide any code (a jsbin would be appreciated), so I can't really debug anything from just a screenshot.

punkratz312 commented 6 years ago

I´ve tried to define a custom element in the js bin but didnt made it work, sorry.

Just define an working custom element that has one property, bind the input´s value to the prop and clear the property after a timeout, triggered by ready function for example. The input will be cleared but not rerendered like in the screenshot.

punkratz312 commented 6 years ago

@notwaldorf plz try to reproduce the bug, I have no idea how to define a custom polymer element in the js bin. Binding the value to a property and resetting it will lead to this very obviouse bug.

notwaldorf commented 6 years ago

Here's a repro step: http://jsbin.com/lirifuy/edit?html,output

The problem seems to be when you set the value to undefined. It seems fine with null. As a workaround while looking for a fix, can you make sure you're setting the value to null, maybe?

punkratz312 commented 6 years ago

awesome, thx.