Component: Dialog in 'headless' mode can not be focused #15496
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
If you use a
p-dialog
withpTemplate="headless"
an error occurs when you open the dialog."TypeError: Cannot read properties of undefined (reading 'nativeElement')
at Dialog.focus (primeng-dialog.mjs:422:54)
at Dialog.onAnimationStart (primeng-dialog.mjs:732:26)
at Dialog_div_0_div_1_Template_div_animation_animation_start_0_listener (primeng-dialog.mjs:818:37)
at executeListenerWithErrorHandling (core.mjs:25629:16)
at wrapListenerIn_markDirtyAndPreventDefault (core.mjs:25663:22)
at browser.mjs:4780:25
at Array.forEach ()
at browser.mjs:4778:46
at _ZoneDelegate.invoke (zone.js:365:28)
at Object.onInvoke (core.mjs:18555:33)"
Environment
You can also see the error here:
https://primeng.org/dialog#headless
Reproducer
No response
Angular version
17.3.7
PrimeNG version
17.14.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.16.0
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
No response
The text was updated successfully, but these errors were encountered: