ContextMenu: appentTo w/ template variable causes error when ContextMenu is destroyed #14793
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
When using a ContextMenu with
[appendTo]="templateVariable"
, an error occurs when it gets destroyed. The error does not occur if all existing ContextMenus are opened.Using
[appendTo]="'body'"
works fine.Environment
Any
Reproducer
https://stackblitz.com/edit/github-ms2ws4
Angular version
17.x
PrimeNG version
17.4.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.18.0
Browser(s)
No response
Steps to reproduce the behavior
See stackblitz with instructions
Expected behavior
Removing ContextMenus should not cause an error.
The text was updated successfully, but these errors were encountered: