material-components / material-web

Material Design Web Components
https://material-web.dev
Apache License 2.0
9.18k stars 873 forks source link

Two instances of 'mwc-textfield' produces an error. #106

Closed anoblet closed 5 years ago

anoblet commented 5 years ago

Not sure if this is the right place to post something like this, but I've been trying to test these elements.

Cloning and linking, I am getting this error when trying to use two instances of 'mwc-textfield' directly inside of the render function without a parent element:

Uncaught (in promise) TypeError: Cannot read property 'parentNode' of null

Creating a single instance of 'mwc-textfield' works as expected.

I'm using the pwa-starter-kit from Polymer.

https://github.com/anoblet/pwa-starter-kit/blob/template-no-redux/src/components/Countdown/View/Input.js

keanulee commented 5 years ago

We are aware of this issue and hoping to release the fix soon - see https://github.com/Polymer/lit-element/issues/202

anoblet commented 5 years ago

Awesome! Thanks a lot!

keanulee commented 5 years ago

Fix released in lit-element 0.6.1 (which should match the semver targets of these elements)