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
Giving the body slot a name does not fix the issue
experimentalSlotFixes does not fix the issue
We've been experiencing this since ~2.x. Might also be in 1.x but have not tested it.
We've been able to reproduce this under a ton of circumstances, not just changing component @State. My guess is that Stencil does not take a slot's name into account when determining whether they are equivalent somewhere.
The bug does not occur when the DOM tree has other major differences, such as by changing <div>Body: <slot /></div> to <section>Body: <slot /></section>. Adding a class or attribute to the element is not a sufficient difference.
The text was updated successfully, but these errors were encountered:
I think that makes sense based on what I understand about the child-reconciliation issues that #5143 aims to address, I wouldn't actually expect that it would fix this issue since it's not directly addressing slot relocation logic and whatnot
Prerequisites
Stencil Version
4.8.1
Current Behavior
After performing the repro steps below, the app displays:
Body: Header
Expected Behavior
After performing the repro steps below, the app displays:
Body: Body
System Info
Steps to Reproduce
Create this component:
Use it like so:
Build the app. It will display this:
Click the button. It will now display this:
Code Reproduction URL
https://github.com/aniederer-chatham/stencil-slot-bug-poc
Additional Information
<div>Body: <slot /></div>
to<section>Body: <slot /></section>
. Adding a class or attribute to the element is not a sufficient difference.The text was updated successfully, but these errors were encountered: