stencil icon indicating copy to clipboard operation
stencil copied to clipboard

Prerendering does not place slot content correctly when not using Shadow DOM

Open maltemuth opened this issue 7 years ago • 7 comments

Stencil version:

@stencil/[email protected]

I'm submitting a:

[x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Steps to reproduce:

# git clone https://github.com/maltemuth/stencil-slot-bug.git
# stencil build --prerender
# npx http-serve www

Current behavior:

HEY Hello, World! I'm Stencil 'Don't call me a framework' JS

Expected behavior:

Hello, HEYWorld! I'm Stencil 'Don't call me a framework' JS

Related code:

see src/components/my-component.tsx and notice the <slot><slot/> placement. When setting shadow: true in Line 7, the behavior is as expected.

Other information:

I think this is related: https://github.com/ionic-team/stencil/issues/781

maltemuth avatar Sep 09 '19 11:09 maltemuth

We also faced the issue. It looks for me like a regression bug.

grewdev avatar Sep 10 '19 12:09 grewdev

This is a duplicate of #1454

maltemuth avatar Sep 13 '19 10:09 maltemuth

Facing this issue as well.

When prerendering a table component which has thead, tbody, rows, and cells each with their own slots, and none of the components are using shadow, the slotted content is rendered outside of the component markup.

matt-mcelhaney avatar Sep 17 '19 14:09 matt-mcelhaney

Same issue here. Created a new issue a couple days ago since did not find/see this issue previously: #2068

arielsalminen avatar Dec 11 '19 19:12 arielsalminen

Same issue here... this is happening to me with angular ngIf (conditional that removes and sets of DOM)

danidelgadoz avatar Mar 25 '20 08:03 danidelgadoz

Also experiencing this issue.

harrysolovay avatar Apr 10 '20 22:04 harrysolovay

Hello @maltemuth, thanks for filing this issue and providing a reproduction case. Sorry that this took so long to address!

I was just able to confirm that this issue is fixed in newer versions of Stencil. On the off-chance that you're still experiencing the problem in your Stencil project you should be able to upgrade to @stencil/core@latest and be on your merry way.

Thanks for filing the issue, and sorry again for the lack of response until now!

alicewriteswrongs avatar Jan 19 '23 16:01 alicewriteswrongs