Skip to content
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

Component: Dialog in 'headless' mode can not be focused #15496

Closed
dodesheide opened this issue May 8, 2024 · 0 comments · Fixed by #15630
Closed

Component: Dialog in 'headless' mode can not be focused #15496

dodesheide opened this issue May 8, 2024 · 0 comments · Fixed by #15630
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@dodesheide
Copy link

Describe the bug

If you use a p-dialog with pTemplate="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

  1. Go to https://primeng.org/dialog#headless
  2. Press Login Button
  3. See Errors in Dev-Tools

Expected behavior

No response

@dodesheide dodesheide added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 8, 2024
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels May 30, 2024
@cetincakiroglu cetincakiroglu added this to the 17.18.0 milestone May 30, 2024
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants