Skip to content

bug: Dynamically rendered slot elements causes NotFoundError on insertBefore call (Angular) #6228

Closed
@glafontaine

Description

@glafontaine

Prerequisites

Stencil Version

4.28.2

Current Behavior

Dynamically rendered slot elements causes issue while patched insertBefore function tries to insert the child.

Image

The issue occurs regardless of the Angular version, whether using *ngIf or the new control flow syntax.

The error seems to have been fixed for React #6140 (although i still manage to get the same error in some specific cases.)

Expected Behavior

It should insert elements without an error.

System Info

System: node 22.13.1
    Platform: windows (10.0.26100)
     Stencil: 4.28.2
  TypeScript: 5.5.4
      Rollup: 4.34.9
      Parse5: 7.2.1
      jQuery: 4.0.0-pre
      Terser: 5.37.0

Steps to Reproduce

reproduction url: https://github.com/glafontaine/stencil-angular-repro

Code Reproduction URL

https://github.com/glafontaine/stencil-angular-repro

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: ValidatedThis PR or Issue is verified to be a bug within StencilHelp Wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions