-
Notifications
You must be signed in to change notification settings - Fork 795
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 slotting with Angular's conditional rendering, 'shadow:false' and named slots. #6043
Comments
Hi @ionic-team, This only seems to occur with elements whose slots have display: contents and contain text nodes. If you set the slot to e.g. display: block or wrap the text in an element such as span, p or div, the error does not occur. In his example that would mean using Angular 17, Stencil 4.22, Safari 18.X.X. url report: https://www2.webkit.org/show_bug.cgi?id=280399#c2 Thanks! |
@cgomezgu thank you for validating. Any contributions that help fix this issue are greatly appreciated. |
Hi @christian-bromann, Is there any revision estimate? Is it one of your short-term plans to review the incident? |
No.
At OutSystems we have limited resources and rely on contributions from the outside. If you are impacted by this problem, the best thing would be to get involved and help resolve it. This is not an "incident", I see this as a bug in an open source project that can be resolved by anyone who is impacted by it. |
thanks to @raqushque for the detailed repro - really helps :) ![]() |
Hi @johnjenkins , Thanks! |
Sorry, @cgomezgu no idea. What you’re experiencing is a different issue to the one described here. Suggest you raise a new issue with a minimum repro - using this issue as an excellent template; the more examples of the problem, the better 🙂 |
Prerequisites
Stencil Version
Tested with 2.22.3 and 4.22.2
Current Behavior
Elements are being "slotted" incorrectly into components with 'shadow:false' when added at runtime (with Angular's @if, for example).
Elements are inserted into default slot if it exists and as a first child of component if it does not.
Components with 'shadow:true' function as expected.
Expected Behavior
Elements are "slotted" into correct location (same as when using component with
shadow: true
)System Info
No response
Steps to Reproduce
Clone the repo
https://github.com/raqushque/stencil-ng-slots-repro
npm i --legacy-peer-deps
npm run start
In app click the buttons
Toggle content
orPush to array
. These add content that should be slotted.Code Reproduction URL
https://github.com/raqushque/stencil-ng-slots-repro
Additional Information
This is likely not a Stencil issue, but rather some sort of conflict between Stencil and Angular. Still, since
@stencil/angular-output-target
exists I'd expect component to work properly in both shadow and non-shadow modes, or this issue be documented. Also, default slots do work, so there could be a solution/workaround on Stencil's side.The text was updated successfully, but these errors were encountered: