Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: incorrect 'slot forwarding' when mixing shadow: true and scoped: true components during SSR hydration #6065

Closed
3 tasks done
johnjenkins opened this issue Nov 26, 2024 · 1 comment · Fixed by #6067
Closed
3 tasks done
Labels

Comments

@johnjenkins
Copy link
Contributor

johnjenkins commented Nov 26, 2024

Prerequisites

Stencil Version

latest

Current Behavior

Given something like:

...
scoped: true,
...
<Host>
  Other stuff

  <shadow-true>
    <slot>Fallback content</slot>
  </shadow-true>

   More stuff
</Host>
  • Nodes that should remain in the scoped: true component are moved to within the shadow: true component.
  • The non-shadow slot fallback content remains showing, despite the slot being used

Expected Behavior

Slotted nodes should be forwarded correctly without affecting the rest of the scoped: true component.

System Info

No response

Steps to Reproduce

Open https://stackblitz.com/edit/stencil-start-ydmeww :

npm run build && npm run express

In the preview window, click on 'non-shadow-forwarded-slot'.

Notice slotted nodes are correctly forwarded, but other component internals are also, incorrectly forwarded.

Notice that the non-shadow <slot> fallback content remains showing despite the slot being used.

Code Reproduction URL

https://stackblitz.com/edit/stencil-start-ydmeww

Additional Information

image
@christian-bromann
Copy link
Member

A fix for this was released in Stencil v4.23.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants