Closed mgiuffrida closed 3 years ago
I had/have the same issue. Here is what I found: paper-dropdown-menu-light uses <div id="input" tabindex="-1"> </div>
to render the selected item label. If the selection is changed to no selection, this div's content is changed to ""
and not to " "
. As a result the div's height is 0px and the whole component is displayed incorrectly.
If you replace paper-dropdown-menu-light's _valueChanged
function with
_valueChanged: function() {
// Only update if it's actually different.
if (this.$.input && this.$.input.textContent !== this.value) {
this.$.input.textContent = this.value;
// insert if the value is empty string to enforce correct rendering
if (this.value == "") {
this.$.input.innerHTML = " ";
}
}
this._setHasContent(!!this.value);
},
this issue disappears.
Fiddle: https://jsfiddle.net/mgiuffrida/ug56pybu/
After selecting a value, deselecting a value causes the dropdown menu button to collapse. Doesn't seem to matter whether it has a label or no-label-float set.