You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that this bug really occurs only for this specific combination of slot > if > repeat. Alternatives such as if inside repeat, dummy span inside container, dummy span inside if, they work fine.
I encountered a similar issue without slot. I found the core issue is the back to back usage of <template> on if.bind or repeat.for.
If you change the first template to a real DOM tag div/span/...
<span if.bind="true">
<template repeat.for="item of items">
${item}
</template>
</span>
The problem goes away. The fix also works on your slot > if > if gist.
I guess the bug is in the implementation of the container-less binding (<template if.bind="true"> and <template repeat.for="item of items"> do not generate wrapper DOM element).
I sense this bug is hard to fix since the if.binding does not know how to remove/replace/add a portion of text. Maybe the container-less binding should inject something like this:
I'm submitting a bug report
1.2.0
Please tell us about your environment:
OS:
all
Browser:
all
Language:
all
Current behavior:
Having a template structure such as this:
container.html
New items added to the array are rendered at the bottom of the container element.
https://gist.run/?id=5c2d55c58bb270bfab2f41026898cd23
Clicking on the button produces: 1 2 3 4 xxx 5 6 7 8 9 10 11 12
Expected/desired behavior:
It should be: 1 2 3 4 5 6 7 8 9 10 11 12 xxx
The text was updated successfully, but these errors were encountered: