stencil icon indicating copy to clipboard operation
stencil copied to clipboard

Non-shadow Slot default content is being hidden

Open fictivecreations opened this issue 5 years ago • 4 comments

Stencil version:

 @stencil/[email protected]

I'm submitting a:

[x] bug report

Current behavior: I have component A that uses component B. component A has a slot with default content. component B has a slot with default content that is placed inside component A.

If, upon using component B, I supply content for the slot, it works fine. But if I don't put anything, the default content from component B is not being displayed in component A, and neither is component A's default content.

Expected behavior: If no slot content is supplied to component B, component B's default content should be displayed by the slot in component A.

Related code: It ends up rendering to the browser like this:

<slot-fb hidden>default content A</slot-fb> (component A with default content)
<slot-fb hidden>default content B</slot-fb> (component B with default content)

So I suspect something is going wrong in the logic of which slot should be marked with hidden, as I would expect only the first one to be hidden.

fictivecreations avatar Dec 02 '19 23:12 fictivecreations

We are having the same problem. Between 1.8.6 and 1.8.7 slots seem to have been broken. We are also seeing "hidden" attributes added to components, searched through our code and found nothing. When we downgraded to 1.8.6, it is working as it always did. These are serious problems.

LeeBurton avatar Feb 17 '20 16:02 LeeBurton

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!

ionitron-bot[bot] avatar Dec 03 '23 16:12 ionitron-bot[bot]

Reopening - this shouldn't have been closed. Sorry about that!

rwaskiewicz avatar Dec 04 '23 13:12 rwaskiewicz

Hey folks,

I'm taking a look at some of the issues that we've labeled as "slot-related". I'm unable to reproduce this with Stencil v4.8.1, but it's entirely possible I'm missing something here. If anyone still experiencing this is willing/able to create a minimal reproduction for us to take a look, it'd be much appreciated. Thanks!

rwaskiewicz avatar Dec 11 '23 14:12 rwaskiewicz

I'm going to close this issue out due to lack of activity. If you're experiencing this issue today, please feel free to open a new issue! Thanks!

rwaskiewicz avatar Apr 04 '24 12:04 rwaskiewicz