Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content nodes in dom-if template do not distribute correctly #1753

Closed
brianchin opened this issue Jun 5, 2015 · 2 comments
Closed

Content nodes in dom-if template do not distribute correctly #1753

brianchin opened this issue Jun 5, 2015 · 2 comments
Assignees
Labels

Comments

@brianchin
Copy link

The following HTML page causes a TypeError when loaded:

<!DOCTYPE html>
<html>
  <head>
    <script>
var Polymer = Polymer || {};
// Uncomment and the error disappears.
// Polymer.dom = 'shadow';
    </script>
    <script src="../webcomponentsjs/webcomponents-lite.js"></script>
    <link rel="import" href="../polymer/polymer.html">
  </head>
  <body>

    <!-- Define test element -->
    <dom-module id="test-elem1">
      <template>
        <content></content>
      </template>
    </dom-module>

    <dom-module id="test-elem2">
      <template>
        <test-elem1>
          <template is="dom-if" if="true">
            <content></content>
          </template>
        </test-elem1>
      </template>
    </dom-module>
    <script>
Polymer({
  is: 'test-elem1',
});

Polymer({
  is: 'test-elem2',
});
    </script>
    <!--
      if using native shadow DOM, works correctly, showing "Hello, World!".
      with shady DOM, causes a TypeError in clearDistributedDestinationInsertionPoints().
    -->
    <test-elem2 id="foo">
      <div>Hello, World!</div>
    </test-elem2>
  </body>
</html>

I've tested this in Chrome. Firefox was a little pickier with my code, so I can't say for certain that it also raises an error, but I suspect so.

@kevinpschaaf kevinpschaaf changed the title Content nodes in template in another custom element do not distribute correctly Content nodes in dom-if template do not distribute correctly Jun 7, 2015
@kevinpschaaf kevinpschaaf added the p2 label Jun 7, 2015
@kevinpschaaf kevinpschaaf assigned sorvell and kevinpschaaf and unassigned sorvell Jun 7, 2015
@kevinpschaaf
Copy link
Member

Should be same fix as #1631.

@kevinpschaaf
Copy link
Member

Will be fixed by #1816

Confirmed fix in repro case here:
http://jsbin.com/hucire/3/edit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants