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
{{ message }}
Repository navigation
Elements rendered outside of slot when shadow not enabled #2641
Current behavior:
I am seeing the behavior described in #897. The only difference is I do not have shadow enabled. If I enable shadow I see the correct behavior.
Expected behavior:
Children added to a slot after initial render should show up inside the designated slot.
Steps to reproduce:
Related code:
Other information:
Reacted by Drew Gaynor, Szymon, Aswathprabhu and John Jenkins
Reacted by Drew Gaynor, Szymon, Huib van Geertruy, Tristan Hollman and John Jenkins
When the component gets re-rendered the newly added elements will be re-positioned.
So a workaround is to add a mutation observer on the component then force a re-render by changing an arbitrary state variable or something.
Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Stencil, please create a new issue and ensure the template is fully filled out.
The fix for this issue has been released as a part of today's v4.2.0 release. To enable it, please ensure that experimantalSlotFixes (Docs) is set to true in your stencil.config.ts file. Thanks!
Activity
fix(gux-tabs): convert gux-tabs to shadow dom component
fix(gux-tabs): convert gux-tabs to shadow dom component
claviska commentedon Nov 18, 2020
Hi, the linked issue is pretty old and was closed out. If this is still affecting you, can you provide a test case so we can replicate it? Thanks!
johnjenkins commentedon Nov 26, 2020
I see this issue too :)

^ there's the effect.
https://github.com/johnjenkins/stencil-scoped-append-bug
^ there's a minimum repro
When the component gets re-rendered the newly added elements will be re-positioned.
So a workaround is to add a mutation observer on the component then force a re-render by changing an arbitrary state variable or something.
claviska commentedon Nov 30, 2020
Thanks for the repo. I've confirmed that this occurs when:
<slot>viainsertAdjacentHTML('beforeend', ...),el.appendChild(...), and alsoel.innerHTML += '...'ionitron-bot commentedon Dec 30, 2020
Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Stencil, please create a new issue and ensure the template is fully filled out.
Thank you for using Stencil!
rwaskiewicz commentedon Sep 5, 2023
The fix for this issue has been released as a part of today's v4.2.0 release. To enable it, please ensure that experimantalSlotFixes (Docs) is set to
truein yourstencil.config.tsfile. Thanks!