bnavetta / aurelia-polymer

Aurelia plugin to support Polymer
MIT License
18 stars 5 forks source link

Cannot read property 'insertBefore' of null at View.insertNodesBefore #20

Closed HIRANO-Satoshi closed 7 years ago

HIRANO-Satoshi commented 7 years ago

I got Cannot read property 'insertBefore' of null at View.insertNodesBefore error when I called aurelia.setRoot() and navigation menu in a paper-tabs disappeared.

      <paper-tabs>
           <paper-tab link repeat.for="row of router.navigation" name.bind="row.config.name">
              <a href.bind="row.href" class="link" tabindex="-1" >${row.title}</a>
           </paper-tab>
    </paper-tabs>

Here is a workaround.

  1. Apply this patch to aurelia-templating.js.
  2. Apply this workaround. That is, wrap paper-tab within div.
  3. Add au-select to paper-tabs.
      <paper-tabs au-select>
         <div>
           <paper-tab link repeat.for="row of router.navigation" name.bind="row.config.name">
              <a href.bind="row.href" class="link" tabindex="-1" >${row.title}</a>
           </paper-tab>
       </div>
    </paper-tabs>

Edit:

The error can happen without setRoot().

There is another issue. The ${row.title} is rendered upper than I expected in a tab. This issue might be fixed by giving style.

You might need to add selectable like this.

bnavetta commented 7 years ago

@HIRANO-Satoshi do you think this is an issue with aurelia/templating instead then?

HIRANO-Satoshi commented 7 years ago

Yes, I do.

Anyway, we are enjoying Aurelia and Polymer. :-)

bnavetta commented 7 years ago

Guess I'll close this then!