stencil
stencil copied to clipboard
Incorrect slot relocation behaviour in hydrate app.
Stencil version:
@stencil/[email protected]
I'm submitting a: [x] bug report
Current behavior:
Build.slotRelocation
is set to false in hydrate app unless you have a non-shadow dom element with a slot. This results in incorrect location of slotted content in outputted HTML. (Similar to #2068)
Expected behavior: Slotted content should replace slot when hydrating:
Steps to reproduce: Create a stencil app with only shadow components, generate a hydrate app and observe incorrect output on hydrate.
Other information:
bug location
src/compiler/app-core/app-data.ts:9
suggested fix
Set Build.slotRelocation
to true if within hydrate app.
workaround
Add a shadowless component containing a <slot />
as a child. This allows all other components to work correctly.
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!
Reopening - this shouldn't have been closed. Sorry about that!
Hey folks 👋
I apologize that nobody's looked into this issue until now. I took a stab at a reproduction case, and wasn't able to reproduce this with Stencil v4.8.1. It is possible that this has been fixed since the original issue was created, although it's equally possible there's something wrong with my reproduction attempt. If anyone is running into this today with Stencil v4.8.1 and is willing/able to create a minimal reproduction case, it'd be greatly appreciated! Thanks!
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!