-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Dialog/OverlayPanel error when using appendTo #6168
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Comments
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
@cagataycivici
to
|
The problem occours if you use an overlaypanel. The temporary fix from @jmesa-sistel also works, if you patch the file overlaypanel.js in primeng/components/overlaypanel/ |
Resolved for 6.1.0-rc.1 (due tomorrow) |
appendTo={document.body} -- worked perfectly for me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
https://github-df7qmz.stackblitz.io/
Current behavior
When the dialog is not visible, hiding its containing element via ngIf (causing dialog OnDestroy) causes an error when using the appendTo attribute
Expected behavior
I'm not sure exactly what is supposed to happen here, but not the error of course :)
Maybe old code that tries to put the dialog back in its "non-body appended" place but with the dialog getting removed from the DOM in 6.0.2 that isn't a thing anymore. Anyway, you guys get it.
Minimal reproduction of the problem with instructions
In stackblitz, show the dialog. Toggle the container back and forth, everything is fine. Hide the dialog, and as soon as you hide the container you get the error.
ERROR TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
at Dialog.restoreAppend (dialog.ts:555)
at Dialog.ngOnDestroy (dialog.ts:590)
The text was updated successfully, but these errors were encountered: