-
Notifications
You must be signed in to change notification settings - Fork 794
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Slotted text node in scoped component is not relocated in the DOM properly when rendered with Maquette #2801
Comments
@eriklharper, is there anything we can do on our end for this? or do we need to wait on Stencil? |
Yes, the workaround for this specific issue is to simply use a plain |
@ionic-team have you had a chance to triage this? |
I'm going to close this issue for now, as a fix for this was released in v2.8.1. Please feel free to open a new issue if this persists! |
@rwaskiewicz I'm still seeing the issue after upgrading Stencil to v2.9.0. I also tried it with v2.8.1, same result. Should I open a new issue or should we re-open this one? Also, could you clone my example repository and see if you see the same result as me? I just pushed the Stencil v2.9.0 update to https://github.com/eriklharper/stencil-maquette-bug |
@eriklharper I put up a PR against your reproduction - I failed to mention in my comment earlier today that this fix is behind a compiler flag, |
Stencil version:
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/
Current behavior:
The first
calcite-label
element rendered using this code reproduces this issue, which is not placing the slotted text node in the proper place in the DOM:Expected behavior:
Sending in plain text (without any wrapping element) to a scoped Stencil component properly places the content in the default
<slot />
position.Steps to reproduce:
git clone https://github.com/eriklharper/stencil-maquette-bug
npm i && npm start
calcite-label
elements. Note that the first one is not placing the text content in the proper place while the second one is.Other information:
Repro environment: https://github.com/eriklharper/stencil-maquette-bug
This is happening in the latest Chrome (87.0.4280.141), Firefox (84.0.2), Safari (14.0.2) and Brave (1.18.78) on MacOS 10.15.7
This also appears to produce very strange behavior in a larger app that is using maquette where a
calcite-panel
stencil element is trying to render.Example code (JSX rendered with maquettejs):
Result:

In the testing I've been doing, this doesn't seem to affect named slots. It only appears to affect the default
<slot />
.The text was updated successfully, but these errors were encountered: